diff options
author | Graham Linden <graham@lindenlab.com> | 2019-02-28 14:06:19 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-02-28 14:06:19 -0800 |
commit | c1d2416826406631807f153e7de9d2b790b0caa5 (patch) | |
tree | e5092c0a9e6ff778d74cb13af44d9c61325fe20f /indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl | |
parent | d7ad30a2d4dfd83f93b0150464214f2df776eb9c (diff) |
EEP performance WIP
Mods to improve alpha obj render performance.
Removes hacky fix for HUD elements getting atmospherics.
Re-orders rendering of glow to remove ~10ms/frame of shader re-re-rebinding.
Fix up default classes and basic shader loading (remove unused shared modules).
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl index 143bafc9c9..e985c50c67 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl @@ -26,16 +26,12 @@ uniform vec4 gamma; -uniform int no_atmo; vec3 getAtmosAttenuation(); +vec3 getAdditiveColor(); vec3 scaleSoftClipFrag(vec3 light) { - if (no_atmo == 1) - { - return light; - } //soft clip effect: light = 1. - clamp(light, vec3(0.), vec3(1.)); light = 1. - pow(light, gamma.xxx); @@ -47,12 +43,13 @@ vec3 scaleSoftClip(vec3 light) return scaleSoftClipFrag(light); } -vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 add, vec3 atten) { - return scaleSoftClipFrag(light.rgb); +vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 add, vec3 atten) +{ + return mix(scaleSoftClipFrag(light.rgb), add, atten); } vec3 fullbrightScaleSoftClip(vec3 light) { - return scaleSoftClipFrag(light); + return fullbrightScaleSoftClipFrag(light, getAdditiveColor(), getAtmosAttenuation()); } |