diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-31 11:57:51 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-31 11:57:51 +0300 |
commit | cfa235b89d686e00456e6d7af99442e5a73ffed8 (patch) | |
tree | 10c6bc17f305fc0b384fca8eb93c1445db525538 /source/blender/draw/engines/image/shaders/image_engine_color_vert.glsl | |
parent | 07514def194a78fbb70931d5fbd002248e8f3c34 (diff) |
Image Editor: Fix background drawing of empty tiles.
Empty (UDIM) tiles where drawn with a transparency checkerboard. They
should be rendered with a border background. The cause is that the image
engine would select a single area that contained all tiles and draw them
as being part of an image.
The fix is to separate the color and depth part of the image engine
shader and only draw the depths of tiles that are enabled.
Diffstat (limited to 'source/blender/draw/engines/image/shaders/image_engine_color_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/image/shaders/image_engine_color_vert.glsl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/draw/engines/image/shaders/image_engine_color_vert.glsl b/source/blender/draw/engines/image/shaders/image_engine_color_vert.glsl new file mode 100644 index 00000000000..fb72a132613 --- /dev/null +++ b/source/blender/draw/engines/image/shaders/image_engine_color_vert.glsl @@ -0,0 +1,11 @@ +#pragma BLENDER_REQUIRE(common_view_lib.glsl) + +void main() +{ + vec3 image_pos = vec3(pos, 0.0); + uv_screen = image_pos.xy; + + vec3 world_pos = point_object_to_world(image_pos); + vec4 position = point_world_to_ndc(world_pos); + gl_Position = position; +} |