Well debugged... I would have never thought of render targets being created at the menu! :o
On Friday, 7 January 2011, Cale Dunlap <cale.dun...@gmail.com> wrote: > Alright I think I found a workaround. > I created 8 new render target *.vtf files and didn't do the Init() operation > on the ITexture instances until the render target has actually been requested > for the first time. This seems to do the trick for now. > > > The old way I was doing it was create them all in memory and then initialize > them all in my IClientRenderTargets implementation when > InitClientRenderTargets() is called and then shut them down when > ShutdownClientRenderTargets() is called. The render targets are passed out as > necessary and marked as "in-use" until they are given back. > > > This didn't seem to work too well. During game load, > InitClientRenderTargets() is called--even for the launcher menu. This created > the render targets just fine; with the correct size. However once I load a > map that uses HDR, the ShutdownClientRenderTargets() function is called > followed by another call to InitClientRenderTargets(). It is this second call > that re-creates the render targets with the incorrect size. > > > Anyway, long story short. I think I got it. > -Cale > > On Fri, Jan 7, 2011 at 11:14 AM, Cale Dunlap <cale.dun...@gmail.com> wrote: > Alright the pattern seems as if this _only_ happens on HDR maps.... hmm... a > clue. > > On Fri, Jan 7, 2011 at 11:04 AM, Cale Dunlap <cale.dun...@gmail.com> wrote: > If by RT_SIZE_EXACT you mean RT_SIZE_NO_CHANGE, then yes I've tried that as > well. I'm pulling my hair out :( I've seriously tried about every combination > of flags I can come up with. > > > > Is it possible that the material system is deciding not to create a render > target texture as big as I'm asking so it just sets it down to 64x64 I > wonder... just to prevent resource over-allocation or something? Who knows... > its such a closed system... :( > > > > > On Fri, Jan 7, 2011 at 10:52 AM, Saul Rennison <saul.renni...@gmail.com> > wrote: > > > > > Have you tried RT_SIZE_EXACT? That might ensure that the render target is > created with exact dimensions. > Thanks, > - Saul. > > > On 7 January 2011 15:30, Cale Dunlap <cale.dun...@gmail.com> wrote: > > > > > > > > Yes there is actually. In order to achieve the effect required we have to > force the tonemap scale to a specific value when rendering the output that > goes to the render target. > > > > > > > > > On Fri, Jan 7, 2011 at 10:11 AM, Saul Rennison <saul.renni...@gmail.com> > wrote: > Is there a reason why your render target needs to be HDR? I've been able to > create render targets perfectly fine without problem. > > > > > > > > > > Thanks, > - Saul. > > > On 7 January 2011 14:59, Cale Dunlap <cale.dun...@gmail.com> wrote: > > > Has anybody else ever seen a case where their render targets are always > returning 64 for both GetActualWidth() and GetActualHeight() ? > This seems to be most prevalent on HDR maps for some reason. Here's the code > that is creating my render target: > > > > > > > > > > > > > > pMaterialSystem->CreateNamedRenderTargetTextureEx2( > VarArgs("_rt_Sensor%d", idx), 512, 512, RT_SIZE_OFFSCREEN, > pMaterialSystem->GetBackBufferFormat(), > > > > > > > > > > > > > MATERIAL_RT_DEPTH_SHARED, TEXTUREFLAGS_CLAMPS | > TEXTUREFLAGS_CLAMPT, CREATERENDERTARGETFLAGS_HDR ); > Where idx is a number between 0 and 7 (total of 8 render targets). Any ideas > why this is happening? > > > > > > > > > > > > > > Thanks in advance! > -Cale > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > > -- Thanks, - Saul. _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders