diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2019-05-06 10:26:16 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2019-05-06 15:35:33 +0000 |
commit | f4570615677464bcf3e69086320def6c6b8841ff (patch) | |
tree | 91ef514df0e2666f992ec69d620526316c314f6a | |
parent | 655c1952563a31179fefb46eb178caa662bc3bee (diff) |
Fix AdditiveColorGradient, Corona, and LightTable shaders
Those shaders broke after adding an alpha channel to the color type.
Task-number: QT3DS-3392
Change-Id: Icba8079e30a9a08398d80c197b397394e3491e89
Reviewed-by: Jari Karppinen <jari.karppinen@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | Studio/Content/Effect Library/AdditiveColorGradient.effect | 2 | ||||
-rw-r--r-- | Studio/Content/Effect Library/Corona.effect | 2 | ||||
-rw-r--r-- | 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); } </FragmentShader> </Shader> 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 ); |