From 07a0bb03f6c858ae846342cbda991136d683c349 Mon Sep 17 00:00:00 2001 From: Daniel Cornelius Date: Sat, 10 Nov 2018 23:17:46 -0600 Subject: [PATCH] Small change to trenchbroom-style grid rendering Made the color channel use `o.Emission` instead of `o.Albedo` to avoid rendering the grid with scene lighting, helping with grid visibility in dark areas. --- Internal/Shaders/BrushPreview.shader | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Internal/Shaders/BrushPreview.shader b/Internal/Shaders/BrushPreview.shader index eaf45e61..92c96f87 100644 --- a/Internal/Shaders/BrushPreview.shader +++ b/Internal/Shaders/BrushPreview.shader @@ -67,14 +67,12 @@ Shader "SabreCSG/BrushPreview" grid.y = step((1.0 - _GridThickness)*_GridSize, mod(grid.y, _GridSize)); float g = saturate(grid.x + grid.y); - - //o.Alpha = g; - - o.Albedo = c.rgb + (g * _GridStrength * _GridToggle); + + o.Emission = c.rgb + (g * _GridStrength * _GridToggle); o.Alpha = c.a + (g * _GridStrength * _GridToggle); } ENDCG } Fallback "Legacy Shaders/Transparent/VertexLit" -} \ No newline at end of file +}