Dpth buffer

Is there a simple way to get the depthbuffer of a renderer into a texture?
i.e. without writing a shader.

sorrily not yet.
you need to write a shader for it.

(little bit offtopic:
if you want to render a texture and a depthbuffer of one scene at the same time you may want to try to use one shader rendering two textures. like demoed here:
girlpower+ Render Targets

so, at the moment it’s manual work…

i just seen this in the nvidia shader library…is this the depthbuffer rendered as color ? looks pretty much like fog.

sugoku, what do you need the depthbuffer for ? motion blur ? i’m curious :)

depth.zip (3.9 kB)

@U7 : this is the deepcolor shader and it return scene depth as a grayscale.

@des…yeah i see that, i wonder what the depth buffer should look like.