8dce2a422bc66a0900d8e68aee2d12f070e54d34
On lower end hardware the film accumulation has bad performance. Sometimes upto 10ms. This PR improves the performance somewhat by adding a specialization constant around the renderpasses that are actually needed for rendering, the number of samples and if reprojection is enabled. `enabled_categories`: Based on the enabled render passes some outer loops are enabled/disabled that handle the specific render passes. This improves the performance as no memory will be reserved for branches that are never accessed. `samples_len` & `use_reprojection`: GPU compilers tend to optimize texture fetches when they to the outer loop. This is only possible when the inner loop can be unrolled. In the case of the film accumulation the inner loop couldn't be unrolled. By adding a specialization constant would allow unrolling of the inner loop. On old or low-end devices the improvement is around 40%. On newer devices the improvement is 50+%. Performance of this shader is similar to the godot. | GPU | Before | New | |----------------------|--------|-------| | NVIDIA GTX 760 | 3.5ms | 2.4ms | | GFX1036 (RDNA2 iGPU) | 9.9ms | 6.2ms | | AMD Radeon Pro W7500 | 2.1ms | 0.9ms | Pull Request: https://projects.blender.org/blender/blender/pulls/118385
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
