Skip to content

Commit daf1551

Browse files
authored
Merge pull request #5 from Necka44/main
Fixes for Issue #1
2 parents c52a8c6 + ba5859e commit daf1551

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Outlines/Scripts/RendererFeatures/ScreenSpaceOutlines.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private class ViewSpaceNormalsTextureSettings {
4040
public RenderTextureFormat colorFormat;
4141
public int depthBufferBits = 16;
4242
public FilterMode filterMode;
43-
public Color backgroundColor;
43+
public Color backgroundColor = Color.black;
4444

4545
[Header("View Space Normal Texture Object Draw Settings")]
4646
public PerObjectData perObjectData;
@@ -78,7 +78,7 @@ public ViewSpaceNormalsTexturePass(RenderPassEvent renderPassEvent, LayerMask la
7878
normalsMaterial = new Material(Shader.Find("Hidden/ViewSpaceNormals"));
7979

8080
occludersMaterial = new Material(Shader.Find("Hidden/UnlitColor"));
81-
occludersMaterial.SetColor("_Color,", normalsTextureSettings.backgroundColor);
81+
occludersMaterial.SetColor("_Color", normalsTextureSettings.backgroundColor);
8282
}
8383

8484
public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) {
@@ -178,7 +178,7 @@ public override void OnCameraCleanup(CommandBuffer cmd) {
178178

179179
}
180180

181-
[SerializeField] private RenderPassEvent renderPassEvent;
181+
[SerializeField] private RenderPassEvent renderPassEvent = RenderPassEvent.AfterRenderingOpaques;
182182
[SerializeField] private LayerMask outlinesLayerMask;
183183
[SerializeField] private LayerMask outlinesOccluderLayerMask;
184184

@@ -201,4 +201,4 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD
201201
renderer.EnqueuePass(screenSpaceOutlinePass);
202202
}
203203

204-
}
204+
}

0 commit comments

Comments
 (0)