Page 1 of 1

How to get a handler to the depth texture

Posted: Tue Nov 18, 2014 9:56 am
by shapeare2014
I need to know the depth value of an object at runtime, so I need to render a depth map. I know how to do it in pure OpenGL, but don't know how to do it with Ogre. I have come across two tutorials on Ogre shadow map, http://www.ogre3d.org/tikiwiki/tiki-ind ... ow+Mapping and http://www.ogre3d.org/tikiwiki/Depth+Shadow+Mapping . However, I can't find any code that pass the depth texture rendered by the first pass to the second pass. Also, I don't know how to get a handler to the depth texture so that I can blit its texel value to system memory. Anyone know about it?

Re: How to get a handler to the depth texture

Posted: Fri Nov 21, 2014 11:13 pm
by spacegaier
To pass textures around between passes/shaders, "compositors" can help (if we are talking about screen-space effects).

http://www.ogre3d.org/docs/manual/manual_29.html