Shadows on RTT

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Tonto
Posts: 3
Joined: Thu May 14, 2009 1:53 pm

Shadows on RTT

Post by Tonto »

Hey all,

I'm trying to use render to texture and I just sort of noticed that the default stencil buffer shadows don't *seem* to show up. Is it true that RTT textures do not get the stencil buffer? Are there any other limitations?

I'm using the OpenGL driver on Windows XP with a nVidia card
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, OpenGL RTTs currently don't support stencil buffers. I'm not sure about DX, maybe you can just try. It'll be fixed in one of the next releases.
Tonto
Posts: 3
Joined: Thu May 14, 2009 1:53 pm

Post by Tonto »

Damn, well, thanks so much for the quick reply :)

I have to lock the rtt buffer so unfortunently I can't use the d3d9 rtt, but I'll check it out anyways.

Thanks!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can lock dx rtts as well.
Tonto
Posts: 3
Joined: Thu May 14, 2009 1:53 pm

Post by Tonto »

When I tried the lock before I encountered an error that printed "Could not lock DIRECT3D9 Texture", same computer with the DirectX device, trying to lock the RTT texture. I can't recreate the error, and it works great now.

Thanks!
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Shadows on RTT

Post by hendu »

Bump - current trunk still has GL RTT stencil disabled. I too would like to see them enabled.

I see there's a more recent patch with a comment from hybrid:
http://sourceforge.net/tracker/?func=de ... tid=540678

What's the status on that?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Shadows on RTT

Post by hybrid »

It's still broken and not properly releasing things.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Shadows on RTT

Post by hendu »

I've posted an updated patch on this issue:

https://sourceforge.net/tracker/index.p ... tid=540678

It addresses your earlier complaint about always creating the stencil, by adding a bool param to the addRenderTarget function.
- I could not find the leak you spoke of. Valgrind runs are identical whether there's a stencil or not.
- I could not see a FPS difference with a stencil vs no stencil. My card supports packed depth/stencil though
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Shadows on RTT

Post by hendu »

Ping.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Shadows on RTT

Post by hendu »

Ping. This is wanted by STK too now.
Post Reply