111111111111

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2026-01-18 13:11:38 +08:00
parent a31269c632
commit de4e399d78
76 changed files with 3199823 additions and 10619 deletions

View File

@@ -39,12 +39,14 @@ namespace Ichni.RhythmGame
base.Refresh();
if (shadowRenderer == null || shadowRenderer.material == null) return;
var mat = shadowRenderer.material;
mat.SetColor("_Color", colorSubmodule.currentBaseColor);
mat.SetColor("_ShadowColor", colorSubmodule.currentEmissionColor);
mat.SetFloat("_ShadowThreshold", shadowThreshold);
mat.SetFloat("_ShadowSmoothness", shadowSmoothness);
mat.SetVector("_FakeLightDir", new Vector4(fakeLightDir.x, fakeLightDir.y, fakeLightDir.z, 0));
mat.SetFloat("_UseWorldLight", useWorldLight ? 1 : 0);
MaterialPropertyBlock materialPropertyBlock = new MaterialPropertyBlock();
materialPropertyBlock.SetColor("_Color", colorSubmodule.currentBaseColor);
materialPropertyBlock.SetColor("_ShadowColor", colorSubmodule.currentEmissionColor);
materialPropertyBlock.SetFloat("_ShadowThreshold", shadowThreshold);
materialPropertyBlock.SetFloat("_ShadowSmoothness", shadowSmoothness);
materialPropertyBlock.SetVector("_FakeLightDir", new Vector4(fakeLightDir.x, fakeLightDir.y, fakeLightDir.z, 0));
materialPropertyBlock.SetFloat("_UseWorldLight", useWorldLight ? 1 : 0);
shadowRenderer.SetPropertyBlock(materialPropertyBlock);
}
// 可选:在属性变更时自动刷新