From 01eea9b06baf38131e411c9cdc28a6e116b60739 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 26 Dec 2025 17:45:13 +0900 Subject: [PATCH 1/2] Use MainlightRealTimeShadow --- .../Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl b/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl index af67f9346..588f13444 100644 --- a/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl +++ b/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl @@ -267,7 +267,7 @@ UtsLight GetUrpMainUtsLight() { UtsLight GetUrpMainUtsLight(float4 shadowCoord, float4 positionCS) { UtsLight light = GetUrpMainUtsLight(); - light.shadowAttenuation = MainLightRealtimeShadowUTS(shadowCoord, positionCS); + light.shadowAttenuation = MainLightRealtimeShadow(shadowCoord); return light; } From 42a050b639314efab3b073096199b50c90e81645 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 26 Dec 2025 17:45:22 +0900 Subject: [PATCH 2/2] remove unused function --- .../UniversalRP/Shaders/UniversalToonBody.hlsl | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl b/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl index 588f13444..fbb0dc7b1 100644 --- a/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl +++ b/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl @@ -195,21 +195,6 @@ struct UtsLight { /////////////////////////////////////////////////////////////////////////////// // Light Abstraction // ///////////////////////////////////////////////////////////////////////////// -half MainLightRealtimeShadowUTS(float4 shadowCoord, float4 positionCS) { -#if !defined(MAIN_LIGHT_CALCULATE_SHADOWS) - return 1.0; -#endif - ShadowSamplingData shadowSamplingData = GetMainLightShadowSamplingData(); - half4 shadowParams = GetMainLightShadowParams(); -#if defined(_MAIN_LIGHT_SHADOWS_SCREEN) - return SampleScreenSpaceShadowmap(shadowCoord); -#endif - - - return SampleShadowmap( - TEXTURE2D_ARGS(_MainLightShadowmapTexture, sampler_MainLightShadowmapTexture), shadowCoord, shadowSamplingData, - shadowParams, false); -} half AdditionalLightRealtimeShadowUTS(int lightIndex, float3 positionWS, float4 positionCS) { #if defined(ADDITIONAL_LIGHT_CALCULATE_SHADOWS)