diff options
| author | yum <yum.food.vr@gmail.com> | 2026-07-21 15:49:33 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-07-21 15:49:33 -0700 |
| commit | 110b619e8579a946f2448c61da380a8e4ae8cc48 (patch) | |
| tree | 00641c6bdca70e07c382c0948e5cb986d4940cbe | |
| parent | 40cca6047a1cbaf9f8567aacddf67a877cdc3530 (diff) | |
Fallback cubemap turns on when scene has no reflection probe
| -rwxr-xr-x | 3ner.shader | 2 | ||||
| -rwxr-xr-x | features.cginc | 2 | ||||
| -rw-r--r-- | filamented.cginc | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/3ner.shader b/3ner.shader index 2fd6b94..c18668a 100755 --- a/3ner.shader +++ b/3ner.shader @@ -41,7 +41,7 @@ Shader "yum_food/3ner" [HideInInspector] m_start_IBL("Image-based lighting", Float) = 0 _Exposure_Occlusion("Exposure Occlusion", Range(0.001, 10)) = 1 - //ifex _Custom_Cubemap_Enabled==0 + //ifex _Custom_Cubemap_Enable_Static==0 [HideInInspector] m_start_Custom_Cubemap("Custom Cubemap", Float) = 0 [ThryToggle(_CUSTOM_CUBEMAP)] _Custom_Cubemap_Enable_Static("Enable (static)", Float) = 0 [DoNotLock] [ToggleUI] _Custom_Cubemap_Enable_Dynamic("Enable (dynamic)", Float) = 0 diff --git a/features.cginc b/features.cginc index 819a9bf..6b7efcf 100755 --- a/features.cginc +++ b/features.cginc @@ -1,7 +1,7 @@ #ifndef __FEATURES_INC #define __FEATURES_INC -//ifex _Custom_Cubemap_Enabled==0 +//ifex _Custom_Cubemap_Enable_Static==0 #if defined(FORWARD_BASE_PASS) || defined(OUTLINES_PASS) #pragma shader_feature_local _CUSTOM_CUBEMAP #endif diff --git a/filamented.cginc b/filamented.cginc index b5d2ea4..23a32d8 100644 --- a/filamented.cginc +++ b/filamented.cginc @@ -4,6 +4,7 @@ #include "data.cginc" #include "globals.cginc" #include "math.cginc" +#include "poi.cginc" /* @@ -269,7 +270,7 @@ inline half3 UnityGI_prefilteredRadiance(const UnityGIInput data, const float pe #if defined(_CUSTOM_CUBEMAP) && !defined(_GLOSSYREFLECTIONS_OFF) UNITY_BRANCH - if (_Custom_Cubemap_Enable_Dynamic) + if (_Custom_Cubemap_Enable_Dynamic || !SceneHasReflections()) { return Unity_GlossyEnvironment_local( UNITY_PASS_TEXCUBE(_Custom_Cubemap), |
