Blender V4.3
engine_image_info.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
7GPU_SHADER_INTERFACE_INFO(image_engine_color_iface, "").smooth(Type::VEC2, "uv_screen");
8
9GPU_SHADER_CREATE_INFO(image_engine_color_shader)
10 .vertex_in(0, Type::IVEC2, "pos")
11 .vertex_out(image_engine_color_iface)
12 .fragment_out(0, Type::VEC4, "fragColor")
13 .push_constant(Type::VEC4, "shuffle")
14 .push_constant(Type::VEC2, "farNearDistances")
15 .push_constant(Type::IVEC2, "offset")
16 .push_constant(Type::INT, "drawFlags")
17 .push_constant(Type::BOOL, "imgPremultiplied")
18 .sampler(0, ImageType::FLOAT_2D, "imageTexture")
19 .sampler(1, ImageType::DEPTH_2D, "depth_texture")
20 .vertex_source("image_engine_color_vert.glsl")
21 .fragment_source("image_engine_color_frag.glsl")
22 .additional_info("draw_modelmat")
23 .do_static_compilation(true);
24
25GPU_SHADER_INTERFACE_INFO(image_engine_depth_iface, "").smooth(Type::VEC2, "uv_image");
26
27GPU_SHADER_CREATE_INFO(image_engine_depth_shader)
28 .vertex_in(0, Type::IVEC2, "pos")
29 .vertex_in(1, Type::VEC2, "uv")
30 .vertex_out(image_engine_depth_iface)
31 .push_constant(Type::VEC4, "min_max_uv")
32 .vertex_source("image_engine_depth_vert.glsl")
33 .fragment_source("image_engine_depth_frag.glsl")
34 .additional_info("draw_modelmat")
35 .depth_write(DepthWrite::ANY)
36 .do_static_compilation(true);
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)