Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2016-09-28 22:02:53 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-09-28 22:11:11 +0300
commit9bac74c27b329545022d40b2969305d47a25213c (patch)
tree03e538c5354f217662bc024e7ecca9ad0df7131b /source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl
parent4c7ff8fb1e3c59439cdd8181b10f6b6dfc478033 (diff)
Complement fixup for 4a1feaa5558ed603 (texture shaders)
We now multiply the alpha by the image alpha (as per severin suggestion). That still doesn't solve the main question of user preference drawing black.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl
index 69bc616db22..d0915ebdc4e 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl
@@ -11,5 +11,6 @@ uniform sampler2D texture_map;
void main()
{
- fragColor = vec4(texture2D(texture_map, texture_coord).rgb, alpha);
+ fragColor = texture2D(texture_map, texture_coord)
+ fragColor.a *= alpha;
}