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:
authorJeroen Bakker <jeroen@blender.org>2022-02-04 11:51:25 +0300
committerJeroen Bakker <jeroen@blender.org>2022-02-04 11:51:25 +0300
commit5088d907e558daf5399cd8ee620380cb59522912 (patch)
tree6563cd04f29ae3253f87f28bcca43697a7d079de /source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl
parentf7a6e8db04bc3f61e4e7ef6e6b07eaef9ce15066 (diff)
Compositor: Backdrop mode changes node grid.
When viewing backdrop on top of the node grid, the grid would be rendered black when the mode wasn't set to RGBA. This fix fixes this by reverting the previous fix of drawing the backdrop and implement a different one that recomputes the UV coordinates on the screen edges.
Diffstat (limited to 'source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl')
-rw-r--r--source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl b/source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl
index 65fd4833b23..0edc18836f0 100644
--- a/source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl
+++ b/source/blender/draw/engines/image/shaders/image_engine_color_frag.glsl
@@ -5,7 +5,6 @@
#define IMAGE_DRAW_FLAG_APPLY_ALPHA (1 << 1)
#define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2)
#define IMAGE_DRAW_FLAG_DEPTH (1 << 3)
-#define IMAGE_DRAW_FLAG_DEPTH_ALWAYS (1 << 4)
#define FAR_DISTANCE farNearDistances.x
#define NEAR_DISTANCE farNearDistances.y
@@ -13,11 +12,9 @@
void main()
{
ivec2 uvs_clamped = ivec2(uv_screen);
- if ((drawFlags & IMAGE_DRAW_FLAG_DEPTH_ALWAYS) == 0) {
- float depth = texelFetch(depth_texture, uvs_clamped, 0).r;
- if (depth == 1.0) {
- discard;
- }
+ float depth = texelFetch(depth_texture, uvs_clamped, 0).r;
+ if (depth == 1.0) {
+ discard;
}
vec4 tex_color = texelFetch(imageTexture, uvs_clamped, 0);