mirror of
https://github.com/DeMuenu/MoonlightVRC.git
synced 2025-12-13 11:33:54 +00:00
Replaces direct variable declarations and code blocks related to 'MoonsLight' with a new 'MoonlightGlobalVariables' macro included from Variables.hlsl. Adds OutLoopSetup macro for loop setup, updates all relevant shaders to use the new macros, and renames comments and identifiers from 'MoonsLight' to 'Moonlight' for consistency. Removes the obsolete MoonsLight.cingc include and its meta file.
19 lines
503 B
HLSL
19 lines
503 B
HLSL
#ifndef InLoopSetup
|
|
#define InLoopSetup(_LightPositions, LightCounter, count, i) \
|
|
if (LightCounter >= count) break; \
|
|
\
|
|
float distanceFromLight = length(i.worldPos - _LightPositions[LightCounter].xyz); \
|
|
if (distanceFromLight > _LightCutoffDistance) continue; \
|
|
\
|
|
float contrib = 0.0; \
|
|
|
|
|
|
#endif
|
|
|
|
#ifndef OutLoopSetup
|
|
#define OutLoopSetup(i, _PlayerCount) \
|
|
int count = (int)_PlayerCount; \
|
|
\
|
|
float4 dmax = float4(0,0,0,1); \
|
|
float dIntensity = 0; \
|
|
#endif |