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:
Diffstat (limited to 'source/blender/draw/engines/image/shaders/infos/engine_image_info.hh')
-rw-r--r--source/blender/draw/engines/image/shaders/infos/engine_image_info.hh26
1 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh b/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh
index 1dd20a9a95b..86a79d13e40 100644
--- a/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh
+++ b/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh
@@ -1,21 +1,29 @@
#include "gpu_shader_create_info.hh"
-GPU_SHADER_INTERFACE_INFO(image_engine_iface, "")
- .smooth(Type::VEC2, "uv_screen")
- .smooth(Type::VEC2, "uv_image");
+GPU_SHADER_INTERFACE_INFO(image_engine_color_iface, "").smooth(Type::VEC2, "uv_screen");
-GPU_SHADER_CREATE_INFO(image_engine_shader)
+GPU_SHADER_CREATE_INFO(image_engine_color_shader)
.vertex_in(0, Type::VEC2, "pos")
- .vertex_in(1, Type::VEC2, "uv")
- .vertex_out(image_engine_iface)
+ .vertex_out(image_engine_color_iface)
.fragment_out(0, Type::VEC4, "fragColor")
.push_constant(Type::VEC4, "shuffle")
- .push_constant(Type::VEC2, "maxUv")
.push_constant(Type::VEC2, "farNearDistances")
.push_constant(Type::INT, "drawFlags")
.push_constant(Type::BOOL, "imgPremultiplied")
.sampler(0, ImageType::FLOAT_2D, "imageTexture")
- .vertex_source("image_engine_vert.glsl")
- .fragment_source("image_engine_frag.glsl")
+ .vertex_source("image_engine_color_vert.glsl")
+ .fragment_source("image_engine_color_frag.glsl")
+ .additional_info("draw_modelmat")
+ .do_static_compilation(true);
+
+GPU_SHADER_INTERFACE_INFO(image_engine_depth_iface, "").smooth(Type::VEC2, "uv_image");
+
+GPU_SHADER_CREATE_INFO(image_engine_depth_shader)
+ .vertex_in(0, Type::VEC2, "pos")
+ .vertex_in(1, Type::VEC2, "uv")
+ .vertex_out(image_engine_depth_iface)
+ .push_constant(Type::VEC4, "min_max_uv")
+ .vertex_source("image_engine_depth_vert.glsl")
+ .fragment_source("image_engine_depth_frag.glsl")
.additional_info("draw_modelmat")
.do_static_compilation(true);