Legendary Renderer Update 2

Legendary Renderer Update 2

Hello there, it's time for the semi-regular update on my Unity Scriptable Render Pipeline, Legendary Renderer.

This past couple of months I have worked on improving the volumetric lighting and I also added a new feature, which I will write about later in this post.

First of all, here's the new and improved volumetrics, they look much nicer now. I used to start raymarching from the camera until the furthest depth in the scene (which means the quality varied based on scene depth distance, not the best...)

Currenly the volumetrics render on a cone / sphere (spot/point light) mesh using backface culling and switch to a fullscreen pass when the camera is close to the volume. Before I render the actual volumetric effect to the screen I render a back face depth pass of the same cone / sphere mesh. This allows me to limit the raymarch from the surface of the mesh to the backface depth, allowing spotlights to have a lot nicer quality when the sample count is low, and in general this technique improves the quality of both spot and point volumetrics greatly, allowing less sample steps for the raymarching, boosting performance.

New feature for this month - Reflection Probes with multi-probe blending based on pre-sorting by probe priority value.

When the CullingResults VisibleReflectionProbes array changes in size, I build a CubemapArray texture from all the visible probe cubemaps, up to a maximum of 16 probes blending together.

I think 16 is a sane limit for this system. The probes blend with spherical / box masking and there's support for box projected cubemap reflections too for probes which have that setting enabled.

However, I want to roll my own probe box projection to allow for more control, such as enabling rotation of the bounding box - this will require some tweaks in the shader to rotate the volume, and also some custom gizmo drawing for the editor box visualisation, but for now they are AABB based box projections, which works quite well for most level geometry.

Thank you for reading, I will hopefully have some more to talk about the next time I make a post.