diff options
| author | yum <yum.food.vr@gmail.com> | 2026-07-20 18:42:56 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-07-20 18:42:56 -0700 |
| commit | f3918c9bc9938d6412e0f79ea9201022567dcddc (patch) | |
| tree | 5a0043bb354ffd9664ccda2a3bed079bcefd820b /3ner.cginc | |
| parent | 0aa2636033ce27156c387b5cfbb19ed4ca29d12a (diff) | |
Clanker vertex light support
Diffstat (limited to '3ner.cginc')
| -rwxr-xr-x | 3ner.cginc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -324,6 +324,19 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace BrdfData bd; float4 lit = brdf(i, pbr, light_data, bd); +#if defined(VERTEXLIGHT_ON) && (defined(FORWARD_BASE_PASS) || defined(OUTLINES_PASS)) + [loop] + for (uint light_index = 0; light_index < 4; ++light_index) { + [branch] + if (any(unity_LightColor[light_index].rgb > 0)) { + LightData vertex_light_data = light_data; + GetVertexLighting(i, pbr, light_index, vertex_light_data); + BrdfData vertex_bd; + lit.rgb += brdf(i, pbr, vertex_light_data, true, vertex_bd).rgb; + } + } +#endif + return apply_debug_view(i, pbr, light_data, bd, lit); } |
