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:
| Assembly | Scope |
|---|---|
Warpdev.Luminance.SSR | Runtime |
Warpdev.Luminance.SSR.Editor | Editor 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 / member | Description |
|---|---|
SSRRendererFeature | The renderer feature. |
SSRRendererFeature.Settings | All inspector settings. |
SSRRendererFeature.SsrDebugView | Debug view enum: Off, ScreenUV, WorldNormal, ReflectionDir, ViewNormal, WorldPosition, LinearDepth. |
SSRRendererFeature.RuntimeDebugOverride | static int. Overrides Debug View at runtime, including in player builds. -1 uses the serialized value. |
LuminanceDebugGUI | Optional MonoBehaviour. On-screen buttons to switch Debug View at runtime. |
Namespace Warpdev.Luminance:
| Type / member | Description |
|---|---|
LuminanceVersion | Static 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
| Shader | Role |
|---|---|
Hidden/Luminance/SSR/SSR | Screen-space ray-march / trace |
Hidden/Luminance/SSR/Composite | Gap fill + Fresnel composite |
Hidden/Luminance/SSR/CopyDepthToPyramid | Depth → pyramid mip 0 |
Hidden/Luminance/SSR/HiZDownsample | 2×2 min reduction |
Hidden/Luminance/SSR/BackfaceDepth | Front-face-culled thickness depth |
Hidden/Luminance/SSR/SmoothnessPrepass | Metallic + smoothness buffer |