From 75e61e5a6dc70107eaf784a369f225ca062fdcd5 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 28 Jan 2022 15:00:26 +0100 Subject: Image Engine: Use GPUShaderCreateInfo. Ported the image engine shaders to use the GPUShaderCreateInfo struct. No functional changes. --- .../image/shaders/infos/engine_image_info.hh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 source/blender/draw/engines/image/shaders/infos/engine_image_info.hh (limited to 'source/blender/draw/engines/image/shaders/infos/engine_image_info.hh') 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 -- cgit v1.2.3