How to get a handler to the depth texture

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
shapeare2014
Gnoblar
Posts: 7
Joined: Thu Oct 09, 2014 8:26 am

How to get a handler to the depth texture

Post 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?
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: How to get a handler to the depth texture

Post 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
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Post Reply