Luminance SSR

Scripting & API #

The feature class is Warpdev.Luminance.SSR.SSRRendererFeature, a standard ScriptableRendererFeature. Its Settings are a public serializable class, so you can drive them from editor scripts.

Assemblies

The asset ships with two assembly definitions:

AssemblyScope
Warpdev.Luminance.SSRRuntime
Warpdev.Luminance.SSR.EditorEditor only

asmdef Scripts in the default assembly (Assembly-CSharp) can use the API with no setup - the runtime assembly is marked Auto Referenced. If your scripts live in your own assembly definition, add a reference to Warpdev.Luminance.SSR in your asmdef, or the types will not resolve.

Public API surface

Namespace Warpdev.Luminance.SSR:

Type / memberDescription
SSRRendererFeatureThe renderer feature.
SSRRendererFeature.SettingsAll inspector settings.
SSRRendererFeature.SsrDebugViewDebug view enum: Off, ScreenUV, WorldNormal, ReflectionDir, ViewNormal, WorldPosition, LinearDepth.
SSRRendererFeature.RuntimeDebugOverridestatic int. Overrides Debug View at runtime, including in player builds. -1 uses the serialized value.
LuminanceDebugGUIOptional MonoBehaviour. On-screen buttons to switch Debug View at runtime.

Namespace Warpdev.Luminance:

Type / memberDescription
LuminanceVersionStatic class: Major, Minor, Patch, GetShortVersion(), GetFullVersion(), GetDocumentationUrl(), DocumentationBaseUrl.

Add the feature to every renderer from code

This is exactly what the welcome window's Fix All does. The simplest entry point is to call the menu item, or replicate the logic:

using UnityEngine.Rendering.Universal;

// Find your Universal Renderer Data asset, then:
var feature = ScriptableObject.CreateInstance<Warpdev.Luminance.SSR.SSRRendererFeature>();
feature.name = "Luminance SSR";
feature.settings.ssrShader        = Shader.Find("Hidden/Luminance/SSR/SSR");
feature.settings.copyDepthShader  = Shader.Find("Hidden/Luminance/SSR/CopyDepthToPyramid");
feature.settings.downsampleShader = Shader.Find("Hidden/Luminance/SSR/HiZDownsample");
// ...then add it to the renderer's m_RendererFeatures / m_RendererFeatureMap
// (see LuminanceWelcomeWindow.AddFeature for the full SerializedObject flow).

Adjust settings at runtime

// Grab the feature off your active renderer and tweak it:
var urp = (UniversalRenderPipelineAsset)GraphicsSettings.currentRenderPipeline;
// (Reflection or your own reference to the ScriptableRendererData is needed to reach the feature.)
// Then, e.g.:
feature.settings.intensity = 1.0f;
feature.settings.gapFill   = 6.0f;

Renderer features are assets Settings on a renderer feature are serialized on the renderer data asset, not per-camera. Changing them at runtime affects all cameras using that renderer. For per-camera variation, use separate renderer data assets.

Shader reference

ShaderRole
Hidden/Luminance/SSR/SSRScreen-space ray-march / trace
Hidden/Luminance/SSR/CompositeGap fill + Fresnel composite
Hidden/Luminance/SSR/CopyDepthToPyramidDepth → pyramid mip 0
Hidden/Luminance/SSR/HiZDownsample2×2 min reduction
Hidden/Luminance/SSR/BackfaceDepthFront-face-culled thickness depth
Hidden/Luminance/SSR/SmoothnessPrepassMetallic + smoothness buffer