diff options
author | Rider Linden <rider@lindenlab.com> | 2018-07-19 20:35:00 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-07-19 20:35:00 +0000 |
commit | 881dc7f3aeaf52f8c2adff35ad723d904905cead (patch) | |
tree | 4766db9fe307a47254a2053019762d069bb235d5 /indra/newview/app_settings | |
parent | 80f98daed9aaf74f2d6fa3da9c1525ebcd4293c2 (diff) | |
parent | e3ef7294775c59a8b96ee05b52bba8acc3f8bfa3 (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #29)
MAINT-8876
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/moonF.glsl | 8 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl index 6562b86aaf..2bfc4f3d2f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl @@ -28,9 +28,9 @@ /*[EXTRA_CODE_HERE]*/ #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; +out vec4 frag_data[3]; #else -#define frag_color gl_FragColor +#define frag_data gl_FragData #endif vec3 fullbrightAtmosTransport(vec3 light); @@ -59,6 +59,8 @@ void main() // and shows true moon color at night vec3 luma_weights = vec3(0.1, 0.3, 0.0); float mix = 1.0f - dot(sunlight_color.rgb, luma_weights); - frag_color = vec4(c.rgb, mix * c.a); + frag_data[0] = vec4(c.rgb, mix * c.a); + frag_data[1] = vec4(0.0); + frag_data[2] = vec4(0.0f); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl index d2e3be2720..bbc5049f1c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl @@ -28,9 +28,9 @@ /*[EXTRA_CODE_HERE]*/ #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; +out vec4 frag_data[3]; #else -#define frag_color gl_FragColor +#define frag_data gl_FragData #endif vec3 fullbrightAtmosTransport(vec3 light); @@ -46,10 +46,12 @@ void main() vec4 sunDiscA = texture2D(diffuseMap, vary_texcoord0.xy); vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy); vec4 c = mix(sunDiscB, sunDiscA, blend_factor); - + c.rgb = clamp(c.rgb, vec3(0), vec3(1)); c.rgb = pow(c.rgb, vec3(0.7f)); c.rgb = fullbrightAtmosTransport(c.rgb); c.rgb = fullbrightScaleSoftClip(c.rgb); - frag_color = c; + frag_data[0] = c; + frag_data[1] = vec4(0.0f); + frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0); } |