diff options
| author | yum <yum.food.vr@gmail.com> | 2026-04-01 16:28:25 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-04-01 16:28:25 -0700 |
| commit | e3a071dbde74e863d4bf56ad957d153886f26406 (patch) | |
| tree | e7b18e9baecf55d40e40b8ad39174e4aac472743 /lighting.cginc | |
| parent | 3e074f9d3379bb038db1188eb6a4eeb00e0fd7f2 (diff) | |
Add glitter mask & glitter base roughness override
Diffstat (limited to 'lighting.cginc')
| -rwxr-xr-x | lighting.cginc | 7 |
1 files changed, 6 insertions, 1 deletions
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 |
