From f4570615677464bcf3e69086320def6c6b8841ff Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Mon, 6 May 2019 10:26:16 +0300 Subject: Fix AdditiveColorGradient, Corona, and LightTable shaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those shaders broke after adding an alpha channel to the color type. Task-number: QT3DS-3392 Change-Id: Icba8079e30a9a08398d80c197b397394e3491e89 Reviewed-by: Jari Karppinen Reviewed-by: Antti Määttä Reviewed-by: Tomi Korpipää Reviewed-by: Miikka Heikkinen --- Studio/Content/Effect Library/AdditiveColorGradient.effect | 2 +- Studio/Content/Effect Library/Corona.effect | 2 +- Studio/Content/Effect Library/LightTable.effect | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Studio/Content/Effect Library/AdditiveColorGradient.effect b/Studio/Content/Effect Library/AdditiveColorGradient.effect index 45965a4c..71319635 100644 --- a/Studio/Content/Effect Library/AdditiveColorGradient.effect +++ b/Studio/Content/Effect Library/AdditiveColorGradient.effect @@ -17,7 +17,7 @@ void frag() vec4 origColor = texture2D_0(TexCoord); vec2 uv = TexCoord.xy; - vec4 gradient = vec4(mix(vec4(bottom_color, 1.0), vec4(top_color, 1.0), uv.y)); + vec4 gradient = vec4(mix(vec4(bottom_color.rgb, 1.0), vec4(top_color.rgb, 1.0), uv.y)); gl_FragColor = origColor + gradient; } diff --git a/Studio/Content/Effect Library/Corona.effect b/Studio/Content/Effect Library/Corona.effect index 1447c7e8..fb508120 100644 --- a/Studio/Content/Effect Library/Corona.effect +++ b/Studio/Content/Effect Library/Corona.effect @@ -61,7 +61,7 @@ void vert () void frag() // PS_Blur_Vertical_9tap { float OutCol = GaussianAlphaBlur( Texture0, Texture0Info.z ); - gl_FragColor = OutCol * vec4(GlowCol, 1.0); + gl_FragColor = OutCol * vec4(GlowCol.rgb, 1.0); } diff --git a/Studio/Content/Effect Library/LightTable.effect b/Studio/Content/Effect Library/LightTable.effect index 0c8b84f0..91f59131 100644 --- a/Studio/Content/Effect Library/LightTable.effect +++ b/Studio/Content/Effect Library/LightTable.effect @@ -181,7 +181,7 @@ void frag() // We are basically acting as if the objects on the layer are occluders // so the alpha as a result of blurring is like a transparency. // The behavior is that the brighter the light is, the more of a "gap" there is - vec3 backlight = LightCol * LightBrt; + vec3 backlight = LightCol.rgb * LightBrt; // Assume that the color map I'm using already tells us what N.dot.L is (for now) float translucency = exp2( -overTrn * OverlayTrans ); -- cgit v1.2.3