diff options
author | Dave Parks <davep@lindenlab.com> | 2022-09-22 17:27:18 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-09-22 17:27:18 -0500 |
commit | e5d463ca200bdfa93b8c65e588d490c2f23e3918 (patch) | |
tree | f30bebb5091a9e1a8230a34bd4a2e6ae3e5f7987 /indra/newview/app_settings/shaders/class1/deferred | |
parent | 4697b7049c3557189e6242ac2a8b6a4c2c0588c7 (diff) |
SL-17705 Backwards compatibility pass. Support OpenGL pre-4.0 by disabling reflection probes and anti-aliasing. Get render parity with current release viewer when reflection probes are disabled.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
5 files changed, 14 insertions, 19 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl index 5264b3b716..0e461b4004 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl @@ -73,12 +73,7 @@ void main() vary_position = pos.xyz; vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; -#ifndef HAS_REFLECTION_PROBES - vec3 ref = reflect(pos.xyz, -norm); - vary_texcoord1 = transpose(normal_matrix) * ref.xyz; -#else vary_texcoord1 = norm; -#endif calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/deferred/genbrdflutF.glsl b/indra/newview/app_settings/shaders/class1/deferred/genbrdflutF.glsl index 73a70d8dc5..9e6c853015 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/genbrdflutF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/genbrdflutF.glsl @@ -53,7 +53,7 @@ VARYING vec2 vary_uv; out vec4 outColor; -#define NUM_SAMPLES 1024 +#define NUM_SAMPLES 1024u const float PI = 3.1415926536; diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl index 04be496292..3afa9fb435 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl @@ -99,8 +99,8 @@ vec3 scaleSoftClipFrag(vec3 l); void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float nh, out float nl, out float nv, out float vh, out float lightDist); float calcLegacyDistanceAttenuation(float distance, float falloff); float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen); -void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyEnv, - vec3 pos, vec3 norm, float glossiness, float envIntensity); +void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, + vec3 pos, vec3 norm, float glossiness); // PBR interface vec3 pbrIbl(vec3 diffuseColor, @@ -212,8 +212,7 @@ void main() float gloss = 1.0 - perceptualRoughness; vec3 irradiance = vec3(0); vec3 radiance = vec3(0); - vec3 legacyenv = vec3(0); - sampleReflectionProbes(irradiance, radiance, legacyenv, pos.xyz, norm.xyz, gloss, 0.0); + sampleReflectionProbes(irradiance, radiance, pos.xyz, norm.xyz, gloss); irradiance = max(srgb_to_linear(amblit),irradiance) * ambocc*4.0; vec3 f0 = vec3(0.04); diff --git a/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl index 8f3e38b08b..4b79297aef 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl @@ -24,7 +24,14 @@ */ // fallback stub -- will be used if actual reflection probe shader failed to load (output pink so it's obvious) -void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyenv, +void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, + vec3 pos, vec3 norm, float glossiness) +{ + ambenv = vec3(1,0,1); + glossenv = vec3(1,0,1); +} + +void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyenv, vec3 pos, vec3 norm, float glossiness, float envIntensity) { ambenv = vec3(1,0,1); @@ -34,11 +41,11 @@ void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, inout vec3 l void applyGlossEnv(inout vec3 color, vec3 glossenv, vec4 spec, vec3 pos, vec3 norm) { - color = vec3(1,0,1); + } void applyLegacyEnv(inout vec3 color, vec3 legacyenv, vec4 spec, vec3 pos, vec3 norm, float envIntensity) { - color = vec3(1,0,1); + } diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 918e119c31..4b34e55efd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -156,12 +156,6 @@ void main() } -// linear debuggables -//color.rgb = vec3(final_da); -//color.rgb = vec3(ambient); -//color.rgb = vec3(scol); -//color.rgb = diffuse_srgb.rgb; - // convert to linear as fullscreen lights need to sum in linear colorspace // and will be gamma (re)corrected downstream... |