Reprinted please indicate the source for the klayge game engine, the permanent link of this article is http://www.klayge.org /? P = 2059
According to the previous plan, the volumetric light effect will be added to klayge 4.2. Currently, it has been implemented and integrated into the engine by Parsifal Wang.
Here the volumetric light, or light shaft, method is similar to CE and 3dmark-radial blur is performed on the depth texture and color texture obtained by scene rendering, the obtained result is superimposed back to the original result through Alpha blend. For specific algorithms, refer to the GPU gems 3 article. This method is quite fast. On GTX 480, only 0.3 ms is required, and on low-end mobile graphics cards such as NVS 4200m, only 2.5 ms is required. There is still room for optimization, and the speed will be faster in the future.
Turn on volumetric light, and the static frame effect is not as good as it is:
Turn Off volumetric light: