Blender  V3.3
gpu_shader_text_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2022 Blender Foundation. All rights reserved. */
3 
9 
10 GPU_SHADER_INTERFACE_INFO(text_iface, "")
11  .flat(Type::VEC4, "color_flat")
12  .no_perspective(Type::VEC2, "texCoord_interp")
13  .flat(Type::INT, "glyph_offset")
14  .flat(Type::IVEC2, "glyph_dim")
15  .flat(Type::INT, "interp_size");
16 
17 GPU_SHADER_CREATE_INFO(gpu_shader_text)
18  .vertex_in(0, Type::VEC4, "pos")
19  .vertex_in(1, Type::VEC4, "col")
20  .vertex_in(2, Type ::IVEC2, "glyph_size")
21  .vertex_in(3, Type ::INT, "offset")
22  .vertex_out(text_iface)
23  .fragment_out(0, Type::VEC4, "fragColor")
24  .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
25  .sampler(0, ImageType::FLOAT_2D, "glyph", Frequency::PASS)
26  .vertex_source("gpu_shader_text_vert.glsl")
27  .fragment_source("gpu_shader_text_frag.glsl")
28  .additional_info("gpu_srgb_to_framebuffer_space")
29  .do_static_compilation(true);
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)