From e3a071dbde74e863d4bf56ad957d153886f26406 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 1 Apr 2026 16:28:25 -0700 Subject: Add glitter mask & glitter base roughness override --- lighting.cginc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lighting.cginc') diff --git a/lighting.cginc b/lighting.cginc index 825671b..6653bba 100755 --- a/lighting.cginc +++ b/lighting.cginc @@ -280,9 +280,14 @@ void GetLighting(v2f i, Pbr pbr, out LightData data) { data.indirect.L01g, data.indirect.L01b, data.indirect.dir); +#if defined(_GLITTER_BASE_ROUGHNESS_OVERRIDE) + float glitter_roughness = _Glitter_Base_Roughness_Override; +#else + float glitter_roughness = pbr.roughness; +#endif data.glitter = GetGlitterLighting( _Glitter_Amount, _Glitter_Roughness, _Glitter_Angular_Cells, - _Glitter_Filter_Size, i.uv01.xy, pbr.tbn, pbr.roughness, pbr.normal, + _Glitter_Filter_Size, i.uv01.xy, pbr.tbn, glitter_roughness, pbr.normal, data.common.V, data.direct.H, glitter_indirect_dir); #endif -- cgit v1.2.3