Files
MoonlightVRC/Shader/Includes/DefaultSetup.hlsl
DeMuenu dc939d0ef6 Add WaterParticle shader and minor water shader tweaks
Introduced a new WaterParticle shader for rendering water particles with alpha blending. Made minor formatting and calculation adjustments in Water.shader and DefaultSetup.hlsl, and updated Variables.hlsl. Added corresponding .meta files for new shader assets.
2025-09-26 20:11:49 +02:00

20 lines
496 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