PDA

View Full Version : early depth rendering?



fazekaim
07-06-2006, 01:00 AM
Hello,

i read a lot of papers about performance tips using opengl, and "early depth rendering" is talked by in almost all of them.
I searched on the google without significant result.

Could anybody explain me how to realize early depth rendering?

I have several rendering stages:
- water
- shadow
- normal rendering
- and a rendering for blur effect

i hope i can use this to avoid innecessary depth writing.

thanks...

zeoverlord
07-06-2006, 02:33 AM
It just means that you should render a z-pass first if you use some heavy shaders to reduce the amount of fragments rendered with those shaders.

You can do this in a standalone z-pass or as a part of an ambience pass.

Roderic (Ingenu)
07-06-2006, 02:34 AM
It's a first depth (+optional ambient) pass, such as what the Doom3 engine does.
Just render all Opaque geometry as Depth + light model ambient first, then process your stuff as usual.
You need do that for each RenderTarget in order to have the correct depth.
It must be done just the step before "normal rendering" for your main frame.