$
Elad Damian Nachman
nachd1337gmail.com
# Variable Rate Shading
Variable Rate Shading for the Unity engine: https://github.com/eldnach/vrs-edge/tree/main
This renderer feature uses the Sentis API to import and execute a Sobel Edge Detection model. The output of the model will be converted to a shading rate image, which can be used to optimize the performance of render passes.
Setting a uniform (screen-wide) 2x2 shading rate results in visual artifacts when zoomed:
By applying edge detection to the shading rate, visual fidelity is greatly improved:
Measuring GPU timing of a Volumetric Lighting pass using VRS:
| Shading Rate | GPU Time (Volumetrics) |
| Uniform 1x1 | ~6.4 ms |
| Uniform 2x2 | ~1.6 ms (75% faster) |
| Uniform 4x4 | ~0.5 ms (92% faster) |
| Edge based | ~4.1 ms (35% faster) |