Compare commits

..

3 Commits

Author SHA1 Message Date
DeMuenu 21bb6193a2 Merge branch 'main' into optimisations-from-gemini 2026-05-27 11:45:12 +02:00
DeMuenu a412ae2dc6 Merge branch 'main' of https://github.com/DeMuenu/MoonlightVRC 2026-03-26 22:04:56 +01:00
DeMuenu 9401c47631 Klammer fix oder so 2026-03-26 22:04:52 +01:00
4 changed files with 19 additions and 5 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ Shader "DeMuenu/World/Hoppou/Particles/LitParticles_2SP"
float4 ShadowCasterMult_1 = 1; float4 ShadowCasterMult_1 = 1;
float4 ShadowCasterMult_2 = 1; float4 ShadowCasterMult_2 = 1;
if (shadowCastingEnabled) if ((((_Udon_ShadowMapIndex[LightCounter] > 0.5) && (_Udon_ShadowMapIndex[LightCounter] < 1.5) && (_EnableShadowCasting > 0.5)) || (_Udon_ShadowMapIndex[LightCounter] > 2.5)) && _EnableShadowCasting)
{ {
half smIndex = _Udon_ShadowMapIndex[LightCounter]; half smIndex = _Udon_ShadowMapIndex[LightCounter];
if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5) if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5)
+8 -1
View File
@@ -143,7 +143,14 @@ Shader "DeMuenu/World/Hoppou/Standard_2SP"
float4 ShadowCasterMult_1 = 1; float4 ShadowCasterMult_1 = 1;
float4 ShadowCasterMult_2 = 1; float4 ShadowCasterMult_2 = 1;
if (shadowCastingEnabled) if ((((_Udon_ShadowMapIndex[LightCounter] > 0.5) && (_Udon_ShadowMapIndex[LightCounter] < 1.5) && (_EnableShadowCasting > 0.5)) || (_Udon_ShadowMapIndex[LightCounter] > 2.5)) && _EnableShadowCasting) {
float4 sc1 = SampleShadowcasterPlaneWS_Basis(
_Udon_LightPositions[LightCounter].xyz, i.worldPos,
_Udon_Plane_Origin_1.xyz, _Udon_Plane_Uinv_1.xyz, _Udon_Plane_Vinv_1.xyz, _Udon_Plane_Normal_1.xyz,
_Udon_shadowCasterTex_1, _Udon_OutSideColor_1, _Udon_shadowCasterColor_1, _BlurPixels, _Udon_shadowCasterTex_1_TexelSize.xy);
ShadowCasterMult_1 = max(sc1, _Udon_MinBrightnessShadow_1);
}
if (_Udon_ShadowMapIndex[LightCounter] > 1.5 && (_EnableShadowCasting > 0.5))
{ {
half smIndex = _Udon_ShadowMapIndex[LightCounter]; half smIndex = _Udon_ShadowMapIndex[LightCounter];
if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5) if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5)
+9 -1
View File
@@ -155,7 +155,15 @@ Shader "DeMuenu/World/Hoppou/Standard_Lightmap_2SP"
float4 ShadowCasterMult_1 = 1; float4 ShadowCasterMult_1 = 1;
float4 ShadowCasterMult_2 = 1; float4 ShadowCasterMult_2 = 1;
if (shadowCastingEnabled) if ((((_Udon_ShadowMapIndex[LightCounter] > 0.5) && (_Udon_ShadowMapIndex[LightCounter] < 1.5) && (_EnableShadowCasting > 0.5)) || (_Udon_ShadowMapIndex[LightCounter] > 2.5)) && _EnableShadowCasting)
{
float4 sc1 = SampleShadowcasterPlaneWS_Basis(
_Udon_LightPositions[LightCounter].xyz, i.worldPos,
_Udon_Plane_Origin_1.xyz, _Udon_Plane_Uinv_1.xyz, _Udon_Plane_Vinv_1.xyz, _Udon_Plane_Normal_1.xyz,
_Udon_shadowCasterTex_1, _Udon_OutSideColor_1, _Udon_shadowCasterColor_1, _BlurPixels, _Udon_shadowCasterTex_1_TexelSize.xy);
ShadowCasterMult_1 = max(sc1, _Udon_MinBrightnessShadow_1);
}
if (_Udon_ShadowMapIndex[LightCounter] > 1.5 && (_EnableShadowCasting > 0.5))
{ {
half smIndex = _Udon_ShadowMapIndex[LightCounter]; half smIndex = _Udon_ShadowMapIndex[LightCounter];
if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5) if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5)
+1 -2
View File
@@ -186,7 +186,7 @@ Shader "DeMuenu/World/Hoppou/WaterFlat_2SP"
float4 ShadowCasterMult_1 = 1; float4 ShadowCasterMult_1 = 1;
float4 ShadowCasterMult_2 = 1; float4 ShadowCasterMult_2 = 1;
if (shadowCastingEnabled) if ((((_Udon_ShadowMapIndex[LightCounter] > 0.5) && (_Udon_ShadowMapIndex[LightCounter] < 1.5) && (_EnableShadowCasting > 0.5)) || (_Udon_ShadowMapIndex[LightCounter] > 2.5)) && _EnableShadowCasting)
{ {
half smIndex = _Udon_ShadowMapIndex[LightCounter]; half smIndex = _Udon_ShadowMapIndex[LightCounter];
if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5) if ((smIndex > 0.5 && smIndex < 1.5) || smIndex > 2.5)
@@ -216,7 +216,6 @@ Shader "DeMuenu/World/Hoppou/WaterFlat_2SP"
//dmax = dmax + contrib * float4(LightColor, 1); // accumulate light contributions //dmax = dmax + contrib * float4(LightColor, 1); // accumulate light contributions
} }
//dmax.xyz = min(dmax * dIntensity, 1.0); //dmax.xyz = min(dmax * dIntensity, 1.0);