mirror of
https://github.com/DeMuenu/MoonlightVRC.git
synced 2026-05-06 18:22:22 +00:00
optimisations skipping empty for loops
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
{ \
|
||||
float distAtten = max(1.0, distanceFromLight - radius) * invSqMul; \
|
||||
contrib = _Udon_LightColors[LightCounter].a / max(1e-4, distAtten * distAtten); \
|
||||
\
|
||||
if (contrib == 0.0) continue;\
|
||||
dIntensity += contrib; \
|
||||
} \
|
||||
else if (typeId == 1) \
|
||||
@@ -18,6 +18,7 @@
|
||||
contrib = smoothstep(radius,_Udon_LightDirections[LightCounter].w, contrib); \
|
||||
\
|
||||
contrib = contrib * invSq; \
|
||||
if (contrib == 0.0) continue;\
|
||||
dIntensity += contrib; \
|
||||
} \
|
||||
half3 LightColor = _Udon_LightColors[LightCounter].xyz; \
|
||||
|
||||
Reference in New Issue
Block a user