Game Development Community

Rendering a depth map?

by iHugMedia · in Torque Game Engine Advanced · 03/02/2010 (1:41 pm) · 4 replies

Hey,

I was wondering if anyone had implemented any schemes to render a scene to a depth-map and pass it to a shader? I've been looking around but there doesn't seem to be much information on doing this in the engine - I'm not that great with shaders though, so I'm probably missing something.

I'm using the full-screen shaders resource as a start - theres some cool stuff in there, but theres only so much you can do (mostly edge-detection wise) with only the colour space available.

Thanks,
Mince

#1
03/11/2010 (11:46 am)
The SSAO kit from Ubiq Visuals does it.
They did a manager,that render a linear depth map using render to texture.
They use a shader feature to sample from the map.
#2
03/14/2010 (4:00 pm)
I'll take a look at it - thanks.
I think I'll have to come back to this issue when I've become more familiar with the GFX system in Torque, it's looking more complex than I initially anticipated.
#3
03/15/2010 (10:43 am)
Why do you need a depth map ?
Instead of buying this kit you can invest $100 in T3D binary.
You can sample the per-pixel depth out of the box there,thus the new engine is more shader oriented.
Many old bugs still present in TGE/TGEA (including shader bugs),now having both engines I see working with TGEA as a waste of time.
#4
03/15/2010 (2:33 pm)
I would have by now, but I've made engine modifications that require source access, specifically with some custom-drawn UI elements and integrating the Yack Pack, and I simply can't afford the $750 it would cost me to upgrade to the source version. My plan was to get as far as I can with TGEA and upgrade when I save up enough cash.
I might end up springing for the AO pack in the near future though.