Files
MoonlightVRC/Shader/Includes/Variables.hlsl
DeMuenu 868e713336 Add shadowcaster support to lighting and shaders
Introduces shadowcaster support by adding shadow map index fields to light data, updating PlayerPositionsToShader and LightdataStorage to handle shadow map indices, and extending the shader and its includes to sample shadowcaster planes. Adds ShadowcasterUpdater script and editor preview for updating world-to-local matrices, and updates relevant arrays and property handling throughout the codebase. Also adds a sample plane mesh for shadowcasting.
2025-09-29 23:14:38 +02:00

14 lines
571 B
HLSL

#ifndef MoonlightGlobalVariables
#define MoonlightGlobalVariables \
\
float _InverseSqareMultiplier; \
float _LightCutoffDistance; \
\
float4 _Udon_LightPositions[MAX_LIGHTS]; /* xyz = position */ \
float4 _Udon_LightColors[MAX_LIGHTS]; /* xyz = position */ \
float4 _Udon_LightDirections[MAX_LIGHTS]; /* xyz = direction, w = cos(halfAngle) */ \
float _Udon_LightType[MAX_LIGHTS]; /* 0 = sphere, 1 = cone */ \
float _Udon_ShadowMapIndex[MAX_LIGHTS];\
float _Udon_PlayerCount; /* set via SetFloat */ \
#endif