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-01-28 17:00:26 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-28 17:03:45 +0300
commit75e61e5a6dc70107eaf784a369f225ca062fdcd5 (patch)
tree7a18887c86233f25cb7fc40a0f65635dd91f9257 /source/blender/draw/engines/image/shaders/infos/engine_image_info.hh
parent430f71fce289e876602178330ac725c46c043abf (diff)
Image Engine: Use GPUShaderCreateInfo.
Ported the image engine shaders to use the GPUShaderCreateInfo struct. No functional changes.
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.hh22
1 files changed, 22 insertions, 0 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
new file mode 100644
index 00000000000..e691abfadcf
--- /dev/null
+++ b/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh
@@ -0,0 +1,22 @@
+#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_CREATE_INFO(image_engine_shader)
+ .vertex_in(0, Type::VEC2, "pos")
+ .vertex_in(1, Type::VEC2, "uv")
+ .vertex_out(image_engine_iface)
+ .fragment_out(0, Type::VEC4, "fragColor")
+ .push_constant(Type::VEC4, "shuffle")
+ .push_constant(Type::VEC4, "col")
+ .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")
+ .additional_info("draw_modelmat")
+ .do_static_compilation(true); \ No newline at end of file