Skip to content

Screen Space Reflections Rennovation #4226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
10ff898
Resolve the vast majority of SSR's problems in one go.
Geenz Jun 6, 2025
5aee7e6
Modularize and document.
Geenz Jun 6, 2025
6eb00fb
Make sure to sample as many probes as we can on water specifically wh…
Geenz Jun 6, 2025
9ff815b
Start getting multi-pass tracing setup.
Geenz Jun 7, 2025
3fb627a
Insert fifth element reference here
Geenz Jun 7, 2025
ab80b65
Just do a depth based exponential scale for the step sizing. Seems t…
Geenz Jun 7, 2025
9bdfe55
Get some sane defaults setup.
Geenz Jun 7, 2025
e0b167d
Many more tweaks + some additional depth fade stuff for super far off…
Geenz Jun 8, 2025
a0b1d4d
Update to the feature table to enable SSR on Ultra settings.
Geenz Jun 8, 2025
2a675e5
Add a few early outs to help reduce unnecessary traces.
Geenz Jun 8, 2025
1dc2a23
Use a GGX based blur instead.
Geenz Jun 8, 2025
82b9723
Tweak the max roughness to better avoid striations when you move the …
Geenz Jun 8, 2025
4393d34
Make the scale a bit better for high roughness values.
Geenz Jun 8, 2025
cfae6dc
Slight tweak to make SSR reflections more pronounced when replacing p…
Geenz Jun 8, 2025
6a289c6
Take care of trailing white spaces.
Geenz Jun 8, 2025
06e5ad8
More trailing white spaces.
Geenz Jun 8, 2025
c8d2c4c
More tuning to balance out some of the black striations in the distan…
Geenz Jun 8, 2025
129b6e4
Add support for adjustable max Z depth and roughness.
Geenz Jun 9, 2025
9b12d2d
White space.
Geenz Jun 9, 2025
50a1e54
Merge branch 'develop' into geenz/ssr-rennovation
Geenz Jun 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions indra/llrender/llshadermgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,10 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("glossySampleCount");
mReservedUniforms.push_back("noiseSine");
mReservedUniforms.push_back("adaptiveStepMultiplier");
mReservedUniforms.push_back("splitParamsStart");
mReservedUniforms.push_back("splitParamsEnd");
mReservedUniforms.push_back("maxZDepth");
mReservedUniforms.push_back("maxRoughness");

mReservedUniforms.push_back("modelview_delta");
mReservedUniforms.push_back("inv_modelview_delta");
Expand Down
4 changes: 4 additions & 0 deletions indra/llrender/llshadermgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ class LLShaderMgr
DEFERRED_SSR_GLOSSY_SAMPLES, // "glossySampleCount"
DEFERRED_SSR_NOISE_SINE, // "noiseSine"
DEFERRED_SSR_ADAPTIVE_STEP_MULT, // "adaptiveStepMultiplier"
DEFERRED_SSR_SPLIT_START, // "splitParamsStart"
DEFERRED_SSR_SPLIT_END, // "splitParamsEnd"
DEFERRED_SSR_MAX_Z, // "maxZDepth"
DEFERRED_SSR_MAX_ROUGHNESS, // "maxRoughness"

MODELVIEW_DELTA_MATRIX, // "modelview_delta"
INVERSE_MODELVIEW_DELTA_MATRIX, // "inv_modelview_delta"
Expand Down
94 changes: 83 additions & 11 deletions indra/newview/app_settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7592,9 +7592,13 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<string>Vector3</string>
<key>Value</key>
<integer>25</integer>
<array>
<real>30</real>
<real>16</real>
<real>16</real>
</array>
</map>
<key>RenderScreenSpaceReflectionRayStep</key>
<map>
Expand All @@ -7603,9 +7607,13 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<string>Vector3</string>
<key>Value</key>
<real>0.1</real>
<array>
<real>0.035</real>
<real>0.75</real>
<real>1</real>
</array>
</map>
<key>RenderScreenSpaceReflectionDistanceBias</key>
<map>
Expand All @@ -7614,9 +7622,13 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<string>Vector3</string>
<key>Value</key>
<real>0.015</real>
<array>
<real>0.01</real>
<real>0.4</real>
<real>10</real>
</array>
</map>
<key>RenderScreenSpaceReflectionDepthRejectBias</key>
<map>
Expand All @@ -7625,9 +7637,13 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<string>Vector3</string>
<key>Value</key>
<real>0.001</real>
<array>
<real>0.001</real>
<real>0.001</real>
<real>0.001</real>
</array>
</map>
<key>RenderScreenSpaceReflectionAdaptiveStepMultiplier</key>
<map>
Expand All @@ -7636,9 +7652,43 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<string>Vector3</string>
<key>Value</key>
<array>
<real>1.197</real>
<real>1.5</real>
<real>2</real>
</array>
</map>
<key>RenderScreenSpaceReflectionSplitStart</key>
<map>
<key>Comment</key>
<string>Starting splits for each SSR pass.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Vector3</string>
<key>Value</key>
<real>1.6</real>
<array>
<real>0</real>
<real>5</real>
<real>50</real>
</array>
</map>
<key>RenderScreenSpaceReflectionSplitEnd</key>
<map>
<key>Comment</key>
<string>Ending splits for each SSR pass.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Vector3</string>
<key>Value</key>
<array>
<real>25</real>
<real>150</real>
<real>1000</real>
</array>
</map>
<key>RenderScreenSpaceReflectionGlossySamples</key>
<map>
Expand All @@ -7649,7 +7699,29 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>4</integer>
<integer>2</integer>
</map>
<key>RenderScreenSpaceReflectionMaxDepth</key>
<map>
<key>Comment</key>
<string>Maximum depth from the camera to attempt a trace.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>256</real>
</map>
<key>RenderScreenSpaceReflectionMaxRoughness</key>
<map>
<key>Comment</key>
<string>Maximum permitted roughness for screen space reflections.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.45</real>
</map>
<key>RenderBumpmapMinDistanceSquared</key>
<map>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void doProbeSample(inout vec3 ambenv, inout vec3 glossenv,
glossenv = sampleProbes(pos, normalize(refnormpersp), lod);

#if defined(SSR)
if (cube_snapshot != 1 && glossiness >= 0.9)
if (cube_snapshot != 1)
{
vec4 ssr = vec4(0);
if (transparent)
Expand Down
Loading
Loading