diff options
author | Graham Linden <graham@lindenlab.com> | 2019-02-26 14:51:02 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-02-26 14:51:02 -0800 |
commit | 6f820163ce3a42eb90edba6f3907952e7d83517c (patch) | |
tree | 5a44dcbc27ade1b67f872649c6c4d594b8d50d03 /indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | |
parent | 982b8cdef280469d6c04ce9886a8cadaf6d8350c (diff) |
SL-10566 part the first
Tie using deferred rendering in water reflection/distortion map generation to debug var again
(claw back some performance lost to doing post-deferred in water map generation).
Edit softenLightF for class1/class2 to make them comparable again.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index 57997245f8..415c894a43 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -101,17 +101,16 @@ void main() da = clamp(da, 0.0, 1.0); float light_gamma = 1.0/1.3; - da = pow(da, light_gamma); + da = pow(da, light_gamma); vec4 diffuse = texture2DRect(diffuseRect, tc); scol = max(scol_ambocc.r, diffuse.a); + vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy); vec3 col; float bloom = 0.0; { - vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy); - float ambocc = scol_ambocc.g; vec3 sunlit; @@ -147,7 +146,7 @@ void main() col += spec_contrib; } - col = mix(col, diffuse.rgb, diffuse.a); + col = mix(col.rgb, diffuse.rgb, diffuse.a); if (envIntensity > 0.0) { //add environmentmap @@ -155,7 +154,7 @@ void main() vec3 refcol = textureCube(environmentMap, env_vec).rgb; col = mix(col.rgb, refcol, envIntensity); } - + if (norm.w < 0.5) { col = mix(atmosFragLighting(col, additive, atten), fullbrightAtmosTransportFrag(col, additive, atten), diffuse.a); @@ -168,6 +167,7 @@ void main() bloom = fogged.a; #endif } - frag_color.rgb = col; + + frag_color.rgb = col.rgb; frag_color.a = bloom; } |