Blender  V3.3
gpu_shader_gpencil_stroke_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(gpencil_stroke_vert_iface, "geometry_in")
11  .smooth(Type::VEC4, "finalColor")
12  .smooth(Type::FLOAT, "finalThickness");
13 GPU_SHADER_INTERFACE_INFO(gpencil_stroke_geom_iface, "geometry_out")
14  .smooth(Type::VEC4, "mColor")
15  .smooth(Type::VEC2, "mTexCoord");
16 
17 GPU_SHADER_CREATE_INFO(gpu_shader_gpencil_stroke)
18  .vertex_in(0, Type::VEC4, "color")
19  .vertex_in(1, Type::VEC3, "pos")
20  .vertex_in(2, Type::FLOAT, "thickness")
21  .vertex_out(gpencil_stroke_vert_iface)
22  .geometry_layout(PrimitiveIn::LINES_ADJACENCY, PrimitiveOut::TRIANGLE_STRIP, 13)
23  .geometry_out(gpencil_stroke_geom_iface)
24  .fragment_out(0, Type::VEC4, "fragColor")
25 
26  .uniform_buf(0, "GPencilStrokeData", "gpencil_stroke_data")
27 
28  .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
29  .push_constant(Type::MAT4, "ProjectionMatrix")
30  .vertex_source("gpu_shader_gpencil_stroke_vert.glsl")
31  .geometry_source("gpu_shader_gpencil_stroke_geom.glsl")
32  .fragment_source("gpu_shader_gpencil_stroke_frag.glsl")
33  .typedef_source("GPU_shader_shared.h")
34  .do_static_compilation(true);
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT