summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmapmanager.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-01-30 18:56:19 -0600
committerDave Parks <davep@lindenlab.com>2023-01-30 18:56:19 -0600
commit10b8dcc497599042655dcc4037c9ae98d494bd6f (patch)
tree7a3cfb43aad02f032d82d3d2fcbc52ecd0feaac0 /indra/newview/llreflectionmapmanager.h
parent3ef31cb9b28f7b026e109eab69d383dddc922850 (diff)
SL-19015 Bump probe resolution back to 256 by default (drop to 128 if vram < 2GB), remove irradiance map feedback loop (one bounce, but but more stable and allows for much brighter first bounce), make sky contribution to irradiance not tint the world blue. Make irradiance that appears in radiance maps match world irradiance.
Diffstat (limited to 'indra/newview/llreflectionmapmanager.h')
-rw-r--r--indra/newview/llreflectionmapmanager.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h
index 14a6c089da..5936b26b88 100644
--- a/indra/newview/llreflectionmapmanager.h
+++ b/indra/newview/llreflectionmapmanager.h
@@ -38,7 +38,6 @@ class LLViewerObject;
#define LL_MAX_REFLECTION_PROBE_COUNT 256
// reflection probe resolution
-#define LL_REFLECTION_PROBE_RESOLUTION 128
#define LL_IRRADIANCE_MAP_RESOLUTION 64
// reflection probe mininum scale
@@ -94,6 +93,9 @@ public:
// call once at startup to allocate cubemap arrays
void initReflectionMaps();
+ // True if currently updating a radiance map, false if currently updating an irradiance map
+ bool isRadiancePass() { return mRadiancePass; }
+
private:
friend class LLPipeline;
@@ -161,9 +163,21 @@ private:
LLReflectionMap* mUpdatingProbe = nullptr;
U32 mUpdatingFace = 0;
+ // if true, we're generating the radiance map for the current probe, otherwise we're generating the irradiance map.
+ // Update sequence should be to generate the irradiance map from render of the world that has no irradiance,
+ // then generate the radiance map from a render of the world that includes irradiance.
+ // This should avoid feedback loops and ensure that the colors in the radiance maps match the colors in the environment.
+ bool mRadiancePass = false;
+
LLPointer<LLReflectionMap> mDefaultProbe; // default reflection probe to fall back to for pixels with no probe influences (should always be at cube index 0)
// number of reflection probes to use for rendering (based on saved setting RenderReflectionProbeCount)
U32 mReflectionProbeCount;
+
+ // resolution of reflection probes
+ U32 mProbeResolution = 128;
+
+ // maximum LoD of reflection probes (mip levels - 1)
+ F32 mMaxProbeLOD = 6.f;
};