summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-03 10:42:19 -0800
committerGraham Linden <graham@lindenlab.com>2019-03-03 10:42:19 -0800
commit4c3050a3953153aa8753fc10706ad2ef464f3e3d (patch)
tree78ded9c452348f749c8dac87f416aa433f4ca963 /indra/newview/app_settings/shaders/class1/deferred
parentd90b16d350fba72e5011768ee8eb8b3289962dc5 (diff)
SL-10664, SL-10666
Fix up culling issues from perf work and fix Depth of Field rendering to get depth values properly. Baseline for performance work.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl2
3 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 6e1f0f201b..9191787273 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -118,7 +118,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec
da *= spot*spot; // GL_SPOT_EXPONENT=2
// to match spotLight (but not multiSpotLight) *sigh*
- float lit = max(min(da, shadow) * dist_atten,0.0);
+ float lit = max(da * dist_atten,0.0);
col = lit * light_col * diffuse;
float amb_da = ambiance;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index e2ebd928ef..4db2b9ae54 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -119,7 +119,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe
da *= clamp(da, 0.0, 1.0);
da *= pow(da, 1.0 / 1.3);
- float lit = max(min(da,shadow) * dist_atten, 0.0);
+ float lit = max(da * dist_atten, 0.0);
col = light_col*lit*diffuse;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index be5e3538a7..628f73da59 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -167,6 +167,8 @@ void main()
vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz);
+color.rgb = max(fb.rgb, refcol.rgb);
+
frag_data[0] = vec4(color.rgb, 1); // diffuse
frag_data[1] = vec4(0); // speccolor, spec
frag_data[2] = vec4(encode_normal(screenspacewavef.xyz*0.5+0.5), 0.05, 0);// normalxy, 0, 0