summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorHoward Stearns <aech@lindenlab.com>2022-09-09 18:47:16 +0000
committerHoward Stearns <aech@lindenlab.com>2022-09-09 18:47:16 +0000
commit765a99d238da80bcf705f58f8e8d6082050c0260 (patch)
tree88de597a5cf75720f90a0d512fda89860c5a2e3e /indra/newview/app_settings/shaders
parentdfe19c257dbb9d5af6f1e2961015e95847525412 (diff)
parentc9565d6493887b1518465e8a666a75bbe9878f1d (diff)
Merged in SL-17967 (pull request #1113)
SL-17967 require 4.1 core profile
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl2
5 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index 68a57d12f0..449cbeaa28 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -161,7 +161,11 @@ float getDepth(vec2 pos_screen)
vec4 getTexture2DLodAmbient(vec2 tc, float lod)
{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
+#ifndef FXAA_GLSL_120
+ vec4 ret = textureLod(projectionMap, tc, lod);
+#else
+ vec4 ret = texture2D(projectionMap, tc);
+#endif
ret.rgb = srgb_to_linear(ret.rgb);
vec2 dist = tc-vec2(0.5);
@@ -173,7 +177,11 @@ vec4 getTexture2DLodAmbient(vec2 tc, float lod)
vec4 getTexture2DLodDiffuse(vec2 tc, float lod)
{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
+#ifndef FXAA_GLSL_120
+ vec4 ret = textureLod(projectionMap, tc, lod);
+#else
+ vec4 ret = texture2D(projectionMap, tc);
+#endif
ret.rgb = srgb_to_linear(ret.rgb);
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
@@ -216,7 +224,11 @@ vec3 getProjectedLightDiffuseColor(float light_distance, vec2 projected_uv)
vec4 texture2DLodSpecular(vec2 tc, float lod)
{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
+#ifndef FXAA_GLSL_120
+ vec4 ret = textureLod(projectionMap, tc, lod);
+#else
+ vec4 ret = texture2D(projectionMap, tc);
+#endif
ret.rgb = srgb_to_linear(ret.rgb);
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
diff --git a/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl
index ab5badf538..3d96fe25be 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl
@@ -32,7 +32,7 @@
uniform samplerCubeArray reflectionProbes;
-layout (std140, binding = 1) uniform ReflectionProbes
+layout (std140) uniform ReflectionProbes
{
// list of OBBs for user override probes
// box is a set of 3 planes outward facing planes and the depth of the box along that plane
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index 1f5fdde9ca..3ff039261b 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -33,7 +33,7 @@
uniform samplerCubeArray reflectionProbes;
uniform samplerCubeArray irradianceProbes;
-layout (std140, binding = 1) uniform ReflectionProbes
+layout (std140) uniform ReflectionProbes
{
// list of OBBs for user override probes
// box is a set of 3 planes outward facing planes and the depth of the box along that plane
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index e6017534ca..d78c47a36a 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -32,8 +32,8 @@
#define PBR_USE_IRRADIANCE_HACK 1
#define DEBUG_PBR_LIGHT_TYPE 0 // Output no global light to make it easier to see pointLight and spotLight
-#define DEBUG_PBR_PACKORM0 0 // Rough=0, Metal=0
-#define DEBUG_PBR_PACKORM1 0 // Rough=1, Metal=1
+#define DEBUG_PBR_PACK_ORM0 0 // Rough=0, Metal=0
+#define DEBUG_PBR_PACK_ORM1 0 // Rough=1, Metal=1
#define DEBUG_PBR_TANGENT1 1 // Tangent = 1,0,0
#define DEBUG_PBR_VERT2CAM1 0 // vertex2camera = 0,0,1
#define DEBUG_PBR_SPECLIGHT051 0 // Force specLigh to be 0,0.5,1
@@ -76,6 +76,7 @@
#define DEBUG_PBR_IRRADIANCE 0 // Output: Diffuse Irradiance, NOTE: SSAO is factored in
#define DEBUG_PBR_FSS_ESS_LAMBERT 0 // Output: FssEssLambert
#define DEBUG_PBR_EMS 0 // Output: Ems = (1 - BRDF Scale + BRDF Bias)
+#define DEBUG_PBR_EMS_AVG 0 // Output: Avg Ems
#define DEBUG_PBR_AVG 0 // Output: Avg
#define DEBUG_PBR_FMS_EMS 0 // Output: FmsEms
#define DEBUG_PBR_DIFFUSE_K 0 // Output: diffuse FssEssLambert + FmsEms
@@ -114,6 +115,7 @@
#define DEBUG_PBR_SUN_SPEC_FV 0 // F() * V()
#define DEBUG_PBR_SUN_SPEC_DFV 0 // D() * F() * V()
#define DEBUG_PBR_SUN_SPEC_NL_DFV 0 // nl * D() * F() * V()
+#define DEBUG_PBR_SUN_FINAL 0 // LAMBERT_NL + BRDF()
#define DEBUG_PBR_IOR 0 // Output: grayscale IOR
#define DEBUG_PBR_REFLECT0_BASE 0 // Output: black reflect0 default from ior
@@ -339,9 +341,6 @@ void main()
specLight = vec3(0,0.5,1.0);
irradiance = specLight;
#endif
-#if HAS_IBL
- kSpec = mix( kSpec, iridescenceFresnel, iridescenceFactor);
-#endif
vec3 FssEssGGX = kSpec*vScaleBias.x + vScaleBias.y;
#if DEBUG_PBR_SPEC_IBL
vec3 debug_color_spec = specWeight * specLight * FssEssGGX;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
index 9153fe031e..f23e9db040 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
@@ -284,7 +284,7 @@ void main()
}
}
-#if DEBUG_SPOT_DIFFUSE
+#if DEBUG_PBR_SPOT_DIFFUSE
final_color = vec3(nl * dist_atten);
#endif
#if DEBUG_SPOT_NL