mirror of
https://github.com/DeMuenu/MoonlightVRC.git
synced 2025-12-13 11:33:54 +00:00
Updated all relevant shader files and C# script to use Udon-prefixed light and player variables (e.g., _Udon_LightPositions, _Udon_LightColors, _Udon_PlayerCount) for consistency and to avoid naming conflicts. This change affects variable declarations, macro definitions, and all usages in BlendinShader, LitParticles, Water shaders, and included HLSL files.
20 lines
516 B
HLSL
20 lines
516 B
HLSL
#ifndef InLoopSetup
|
|
#define InLoopSetup(_Udon_LightPositions, LightCounter, count, i) \
|
|
if (LightCounter >= count) break; \
|
|
\
|
|
float distanceFromLight = length(i.worldPos - _Udon_LightPositions[LightCounter].xyz); \
|
|
if (distanceFromLight > _LightCutoffDistance) continue; \
|
|
\
|
|
float contrib = 0.0;
|
|
|
|
#endif
|
|
|
|
#ifndef OutLoopSetup
|
|
#define OutLoopSetup(i, _Udon_PlayerCount) \
|
|
int count = (int)_Udon_PlayerCount; \
|
|
\
|
|
float4 dmax = float4(0,0,0,1); \
|
|
float dIntensity = 0;
|
|
|
|
|
|
#endif |