diff options
Diffstat (limited to 'filamented.cginc')
| -rw-r--r-- | filamented.cginc | 11 |
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; |
