#3326 Skip ambient probe sampling when we're in classic mode. Ensure that our passed in ambient lighting is the only thing that gets applied. (#3327)

meow-7.2.2
Jonathan "Geenz" Goodman 2025-01-02 14:42:49 -05:00 committed by GitHub
parent a27515748f
commit cba1807a91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 2 deletions

View File

@ -38,6 +38,8 @@ uniform float max_probe_lod;
uniform bool transparent_surface;
uniform int classic_mode;
#define MAX_REFMAP_COUNT 256 // must match LL_MAX_REFLECTION_PROBE_COUNT
layout (std140) uniform ReflectionProbes
@ -739,7 +741,10 @@ void doProbeSample(inout vec3 ambenv, inout vec3 glossenv,
vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
ambenv = sampleProbeAmbient(pos, norm, amblit);
ambenv = amblit;
if (classic_mode == 0)
ambenv = sampleProbeAmbient(pos, norm, amblit);
float lod = (1.0-glossiness)*reflection_lods;
glossenv = sampleProbes(pos, normalize(refnormpersp), lod);
@ -845,7 +850,10 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout
vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
ambenv = sampleProbeAmbient(pos, norm, amblit);
ambenv = amblit;
if (classic_mode == 0)
ambenv = sampleProbeAmbient(pos, norm, amblit);
if (glossiness > 0.0)
{