diff options
Diffstat (limited to 'source/blender/draw/engines/image/shaders/engine_image_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/image/shaders/engine_image_frag.glsl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl index a79f4915c4d..d4eebb37ccb 100644 --- a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl +++ b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl @@ -6,6 +6,7 @@ #define SIMA_DRAW_FLAG_SHUFFLING (1 << 2) #define SIMA_DRAW_FLAG_DEPTH (1 << 3) #define SIMA_DRAW_FLAG_DO_REPEAT (1 << 4) +#define SIMA_DRAW_FLAG_PURE_EMISSIVE (1 << 5) #ifdef TILED_IMAGE uniform sampler2DArray imageTileArray; @@ -74,6 +75,12 @@ void main() tex_color = texture(imageTexture, uvs_clamped); #endif + if ((drawFlags & SIMA_DRAW_FLAG_PURE_EMISSIVE) == 0) { + if (imgPremultiplied && tex_color.a == 0.0) { + tex_color.rgb = vec3(0.0); + } + } + if ((drawFlags & SIMA_DRAW_FLAG_APPLY_ALPHA) != 0) { if (!imgPremultiplied && tex_color.a != 0.0 && tex_color.a != 1.0) { tex_color.rgb *= tex_color.a; |