From 5321414a72465af0536ae51e334c8d6edfca4366 Mon Sep 17 00:00:00 2001 From: AoiKamishiro Date: Mon, 8 Sep 2025 10:39:34 +0900 Subject: [PATCH] =?UTF-8?q?chor:=20AppSW=E7=94=A8XRMotionVector=E3=83=91?= =?UTF-8?q?=E3=82=B9=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Shaders/vrmc_materials_mtoon_urp.shader | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_urp.shader b/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_urp.shader index 881ea9aa0..74a890cdf 100644 --- a/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_urp.shader +++ b/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_urp.shader @@ -251,6 +251,32 @@ Shader "VRM10/Universal Render Pipeline/MToon10" #include "./vrmc_materials_mtoon_shadowcaster_fragment.hlsl" ENDHLSL } + + Pass + { + Name "XRMotionVectors" + Tags { "LightMode" = "XRMotionVectors" } + ColorMask RGBA + + // Stencil write for obj motion pixels + Stencil + { + WriteMask 1 + Ref 1 + Comp Always + Pass Replace + } + + HLSLPROGRAM + #pragma shader_feature_local _ALPHATEST_ON + #pragma multi_compile _ LOD_FADE_CROSSFADE + #pragma shader_feature_local_vertex _ADD_PRECOMPUTED_VELOCITY + #define APPLICATION_SPACE_WARP_MOTION 1 + + #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ObjectMotionVectors.hlsl" + ENDHLSL + } } FallBack "Hidden/Universal Render Pipeline/FallbackError"