Rename shader light variables to Udon-prefixed versions

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.
This commit is contained in:
DeMuenu
2025-09-26 23:13:06 +02:00
parent 7189afee7b
commit b94c52da3c
7 changed files with 37 additions and 38 deletions

View File

@@ -112,18 +112,18 @@ Shader "DeMuenu/World/Hoppou/RevealStandart"
//Moonlight
float3 N = normalize(i.worldNormal); /*for lambertian diffuse*/
OutLoopSetup(i, _PlayerCount) //defines count, N, dmax, dIntensity
OutLoopSetup(i, _Udon_PlayerCount) //defines count, N, dmax, dIntensity
[loop]
for (int LightCounter = 0; LightCounter < MAX_LIGHTS; LightCounter++)
{
InLoopSetup(_LightPositions, LightCounter, count, i); //defines distanceFromLight, contrib
InLoopSetup(_Udon_LightPositions, LightCounter, count, i); //defines distanceFromLight, contrib
//Lambertian diffuse
Lambert(_LightPositions[LightCounter].xyz ,i, N); //defines NdotL
Lambert(_Udon_LightPositions[LightCounter].xyz ,i, N); //defines NdotL
LightTypeCalculations(_LightColors, LightCounter, i, NdotL, dIntensity, _LightPositions[LightCounter].a, _LightPositions[LightCounter].xyz);
LightTypeCalculations(_Udon_LightColors, LightCounter, i, NdotL, dIntensity, _Udon_LightPositions[LightCounter].a, _Udon_LightPositions[LightCounter].xyz);
dmax = dmax + contrib * float4(LightColor, 1) * NdotL; // accumulate light contributions