mirror of
https://github.com/DeMuenu/MoonlightVRC.git
synced 2025-12-13 19:33:56 +00:00
Add shadowcaster blur support to shaders
Introduces a _BlurPixels property and related parameters to BlendinShader and LitParticles shaders, enabling blurred shadowcaster sampling. Updates Shadowcaster.cginc to support blurred texture sampling using tex2Dgrad when blur is enabled. Also adjusts light intensity calculation in LightStrength.hlsl to remove NdotL multiplication for consistency with new shadow handling.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
{ \
|
||||
contrib = _Udon_LightColors[LightCounter].a / max(1e-4, max(0, max(1, distanceFromLight - radius) * invSqMul) * max(0, max(1, distanceFromLight - radius) * invSqMul)); \
|
||||
\
|
||||
dIntensity += contrib * NdotL; \
|
||||
dIntensity += contrib; \
|
||||
} \
|
||||
else if (_Udon_LightType[LightCounter] == 1) \
|
||||
{ \
|
||||
@@ -17,7 +17,7 @@
|
||||
contrib= 1 - step(threshold, contrib); \
|
||||
\
|
||||
contrib = contrib * invSq; \
|
||||
dIntensity += contrib * NdotL; \
|
||||
dIntensity += contrib; \
|
||||
} \
|
||||
float3 LightColor = _Udon_LightColors[LightCounter].xyz; \
|
||||
|
||||
|
||||
Reference in New Issue
Block a user