| Flatten Depth | Render Tree Usage
This shader is used to flatten a depth pass by normalizing the depth values for each object, based on its minimum, maximum or average depth. After the initial depth pass is performed, the shader uses tag information to compute each object's minimum, maximum, and average depth and then applies the selected depth value to the entire object resulting in a flat, constant depth. The shader then bakes the new depths into the frame buffer just before the .zpic is written to disk.
This output shader isn't used directly in the render tree; rather, it is applied using a pass's shader stack. For more information, see Applying Shaders to Partitions [Rendering].
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License