Blender V4.3
gpu_shader_gpencil_stroke_info.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11GPU_SHADER_INTERFACE_INFO(gpencil_stroke_vert_iface, "geometry_in")
12 .smooth(Type::VEC4, "finalColor")
13 .smooth(Type::FLOAT, "finalThickness");
14GPU_SHADER_INTERFACE_INFO(gpencil_stroke_geom_iface, "geometry_out")
15 .smooth(Type::VEC4, "mColor")
16 .smooth(Type::VEC2, "mTexCoord");
17
18GPU_SHADER_CREATE_INFO(gpu_shader_gpencil_stroke_base)
19 .vertex_in(0, Type::VEC4, "color")
20 .vertex_in(1, Type::VEC3, "pos")
21 .vertex_in(2, Type::FLOAT, "thickness")
22 .vertex_out(gpencil_stroke_vert_iface)
23 .fragment_out(0, Type::VEC4, "fragColor")
24
25 .uniform_buf(0, "GPencilStrokeData", "gpencil_stroke_data")
26
27 .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
28 .push_constant(Type::MAT4, "ProjectionMatrix")
29 .fragment_source("gpu_shader_gpencil_stroke_frag.glsl")
30 .typedef_source("GPU_shader_shared.hh");
31
32GPU_SHADER_CREATE_INFO(gpu_shader_gpencil_stroke)
33 .additional_info("gpu_shader_gpencil_stroke_base")
34 .geometry_layout(PrimitiveIn::LINES_ADJACENCY, PrimitiveOut::TRIANGLE_STRIP, 13)
35 .geometry_out(gpencil_stroke_geom_iface)
36 .vertex_source("gpu_shader_gpencil_stroke_vert.glsl")
37 .geometry_source("gpu_shader_gpencil_stroke_geom.glsl")
38 .do_static_compilation(true);
39
40GPU_SHADER_CREATE_INFO(gpu_shader_gpencil_stroke_no_geom)
41 .metal_backend_only(true)
42 .define("USE_GEOMETRY_IFACE_COLOR")
43 .additional_info("gpu_shader_gpencil_stroke_base")
44 .vertex_out(gpencil_stroke_geom_iface)
45 .vertex_source("gpu_shader_gpencil_stroke_vert_no_geom.glsl")
46 .do_static_compilation(true);
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)