Description of delay rendering in cryengine3
After the play, we changed the early time to use Z-pass to output the Z value of the pixel for Alpha test and render the opaque ry to the texture, we have implemented some functions through latency processing. We started to use a r16f format texture to provide a better quality, but not all hardware support it. The r16g16f format can be well supported, but NVIDIA was not a native format at the time. R32f has good quality and is supported by all hardware, and the speed is also very fast. This format is preferred if the hardware can access the native Z-buffer. This will produce faster rendering of data (Double Z-value read/write performance) with less memory requirements and better image quality. However, this will make access more complex because Z-buffer may not directly return a linear Z value.
Each pixel has a Z value, which can bring more functions and effects:
Delay generation shadow
Z-cutting of soft Particles
Global volume fog Effect
Deep domain Effect
Dynamic blur effect
Fill light (used in cryengine2 to darken or illuminate the surroundings)
Environment light closure in the screen area
By using the delay coloring technology, we can separate complex set scenarios from the shader. For example, shadow mask shader is used to generate a shadow before rendering all the opaque objects in the scene. This shader uses the shadowmap of positional interpolation to output the shadow to build the shadow. The heavy pass of this drawcall is replaced by a delayed pass to re-establish the position in the shadowmap by storing the pixel depth value, instead of executing the drawcall multiple times for all objects in the scenario. Only the drawcall in the screen area is called once.
Example of rendering images in an engine
The linear Z value of gbuffer.
Generate shadow from gbuffer data
Generate ssao using gbuffer data
Useful Console Commands
R_usezpass
Switch to z pass
Usage: r_usezpass [0/1]
The default value is 1 (Enabled ). Set to 0 to disable Z-pass.
R_deferredshading
Switching delay coloring
Usage: r_deferredshading [0/1/2/3]
0-close
1-enable (default)
2-enable interleaved/tiled rendering test (do not use)
3-Add a latency pass for all lights
Author: Wuhua wujiu Source: wine.