Removed the dependency of layer mask of hair shadow caster;

Added HairShadowCaster pass;
This commit is contained in:
Misaki
2025-01-08 23:09:55 +09:00
parent a7a9ad16b5
commit 968b83870f
9 changed files with 97 additions and 146 deletions

View File

@@ -35,7 +35,6 @@ namespace Misaki.HdrpToon
_hairShadowPass = new()
{
name = "UTS Hair Shadow Map",
layerMask = _renderSetting.hairShadowSetting.shadowCasterLayer,
targetColorBuffer = CustomPass.TargetBuffer.None,
targetDepthBuffer = CustomPass.TargetBuffer.None,
};
@@ -47,9 +46,9 @@ namespace Misaki.HdrpToon
targetDepthBuffer = CustomPass.TargetBuffer.None,
};
CustomPassVolume.RegisterGlobalCustomPass(CustomPassInjectionPoint.BeforeRendering, _utsPass);
CustomPassVolume.RegisterGlobalCustomPass(CustomPassInjectionPoint.AfterOpaqueDepthAndNormal, _hairShadowPass);
CustomPassVolume.RegisterGlobalCustomPass(CustomPassInjectionPoint.BeforePostProcess, _outlinePass);
CustomPassVolume.RegisterUniqueGlobalCustomPass(CustomPassInjectionPoint.BeforeRendering, _utsPass);
CustomPassVolume.RegisterUniqueGlobalCustomPass(CustomPassInjectionPoint.AfterOpaqueDepthAndNormal, _hairShadowPass);
CustomPassVolume.RegisterUniqueGlobalCustomPass(CustomPassInjectionPoint.BeforePostProcess, _outlinePass);
NotifyRendererSettingChanged();
}
@@ -68,7 +67,6 @@ namespace Misaki.HdrpToon
return;
}
_hairShadowPass.layerMask = _renderSetting.hairShadowSetting.shadowCasterLayer;
_hairShadowPass.enabled = _renderSetting.hairShadowSetting.enable;
_hairShadowPass.CurrentShadowQuality = _renderSetting.hairShadowSetting.shadowQuality;
if (!_renderSetting.hairShadowSetting.enable)