summaryrefslogtreecommitdiffstats
path: root/filamented.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-07-21 15:23:33 -0700
committeryum <yum.food.vr@gmail.com>2026-07-21 15:23:33 -0700
commit40cca6047a1cbaf9f8567aacddf67a877cdc3530 (patch)
treea2cea92169804e5697aa975f09312b473667c997 /filamented.cginc
parent025662ecf79e0df923b2394dea259540c452c4c4 (diff)
Add custom cubemap; fix normal filtering; make glitter tint HDR
Diffstat (limited to 'filamented.cginc')
-rw-r--r--filamented.cginc11
1 files changed, 11 insertions, 0 deletions
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;