From 40cca6047a1cbaf9f8567aacddf67a877cdc3530 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 21 Jul 2026 15:23:33 -0700 Subject: Add custom cubemap; fix normal filtering; make glitter tint HDR --- filamented.cginc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'filamented.cginc') diff --git a/filamented.cginc b/filamented.cginc index c760b79..b5d2ea4 100644 --- a/filamented.cginc +++ b/filamented.cginc @@ -267,6 +267,17 @@ inline half3 UnityGI_prefilteredRadiance(const UnityGIInput data, const float pe glossIn.roughness = perceptualRoughness; glossIn.reflUVW = r; + #if defined(_CUSTOM_CUBEMAP) && !defined(_GLOSSYREFLECTIONS_OFF) + UNITY_BRANCH + if (_Custom_Cubemap_Enable_Dynamic) + { + return Unity_GlossyEnvironment_local( + UNITY_PASS_TEXCUBE(_Custom_Cubemap), + _Custom_Cubemap_HDR, + glossIn); + } + #endif + #ifdef UNITY_SPECCUBE_BOX_PROJECTION // we will tweak reflUVW in glossIn directly (as we pass it to Unity_GlossyEnvironment twice for probe0 and probe1), so keep original to pass into BoxProjectedCubemapDirection half3 originalReflUVW = glossIn.reflUVW; -- cgit v1.2.3