Unity Lighting System
Direct light is light that is emitted, hits a surface and is then reflected directly into a sensor. Indirect light is all other light that is ultimately reflected into a sensor, including sky light.
Reali-time lighting is calculated at runtime, while baked lighting is calculated in advance and is saved as lighting data.
Unity: Render Feature Blit
In URP’s custom render feature pass, Blit
doesn’t pass the depth/stencil when blitting a color texture. The work around is to create a screen mesh and blit it on the mesh.
Bloom
https://catlikecoding.com/unity/tutorials/advanced-rendering/bloom/
Bloom is essentially three parts:
- find the brightness above the threshold in the texture.
- blur the brightness
- add the result to the original texture.
For the blurring part, we can use Dual Kawase blur. There’s an optimization in the implementation. Instead of getting temporary render texture in the amount of pass, we can only have iteration amount of texture and reuse them by blitting from the last to the first.
As for the the brightness calculation, we can first find the biggest value in the pixel’s RGB value and compare it with the threshold.