MToon10にDepthOnlyPassとDepthNormalsPassを追加

This commit is contained in:
yoship1639
2023-07-21 18:20:06 +09:00
parent 0b48e59f51
commit 6f4d7d2f0d

View File

@@ -161,7 +161,63 @@ Shader "VRM10/Universal Render Pipeline/MToon10"
ENDHLSL
}
// Shadow Caster Path
// Depth Only Pass
Pass
{
Name "DepthOnly"
Tags { "LightMode" = "DepthOnly" }
Cull [_M_CullMode]
ZWrite On
ColorMask 0
HLSLPROGRAM
#pragma target 3.0
// Unity defined keywords
#pragma multi_compile_instancing
#pragma multi_compile __ _ALPHATEST_ON _ALPHABLEND_ON
#pragma vertex MToonDepthOnlyVertex
#pragma fragment MToonDepthOnlyFragment
#define MTOON_URP
#include "./vrmc_materials_mtoon_depthonly_vertex.hlsl"
#include "./vrmc_materials_mtoon_depthonly_fragment.hlsl"
ENDHLSL
}
// Depth Normals Pass
Pass
{
Name "DepthNormals"
Tags { "LightMode" = "DepthNormals" }
Cull [_M_CullMode]
ZWrite On
HLSLPROGRAM
#pragma target 3.0
// Unity defined keywords
#pragma multi_compile_instancing
#pragma multi_compile __ _ALPHATEST_ON _ALPHABLEND_ON
#pragma multi_compile __ _NORMALMAP
#pragma vertex MToonDepthNormalsVertex
#pragma fragment MToonDepthNormalsFragment
#define MTOON_URP
#include "./vrmc_materials_mtoon_depthnormals_vertex.hlsl"
#include "./vrmc_materials_mtoon_depthnormals_fragment.hlsl"
ENDHLSL
}
// Shadow Caster Pass
Pass
{
Name "ShadowCaster"