Blender  V3.3
gpencil_vfx_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 GPU_SHADER_CREATE_INFO(gpencil_fx_common)
6  .sampler(0, ImageType::FLOAT_2D, "colorBuf")
7  .sampler(1, ImageType::FLOAT_2D, "revealBuf")
8  /* Reminder: This is considered SRC color in blend equations.
9  * Same operation on all buffers. */
10  .fragment_out(0, Type::VEC4, "fragColor")
11  .fragment_out(1, Type::VEC4, "fragRevealage")
12  .fragment_source("gpencil_vfx_frag.glsl");
13 
14 GPU_SHADER_CREATE_INFO(gpencil_fx_composite)
15  .do_static_compilation(true)
16  .define("COMPOSITE")
17  .push_constant(Type::BOOL, "isFirstPass")
18  .additional_info("gpencil_fx_common", "draw_fullscreen");
19 
20 GPU_SHADER_CREATE_INFO(gpencil_fx_colorize)
21  .do_static_compilation(true)
22  .define("COLORIZE")
23  .push_constant(Type::VEC3, "lowColor")
24  .push_constant(Type::VEC3, "highColor")
25  .push_constant(Type::FLOAT, "factor")
26  .push_constant(Type::INT, "mode")
27  .additional_info("gpencil_fx_common", "draw_fullscreen");
28 
29 GPU_SHADER_CREATE_INFO(gpencil_fx_blur)
30  .do_static_compilation(true)
31  .define("BLUR")
32  .push_constant(Type::VEC2, "offset")
33  .push_constant(Type::INT, "sampCount")
34  .additional_info("gpencil_fx_common", "draw_fullscreen");
35 
36 GPU_SHADER_CREATE_INFO(gpencil_fx_transform)
37  .do_static_compilation(true)
38  .define("TRANSFORM")
39  .push_constant(Type::VEC2, "axisFlip")
40  .push_constant(Type::VEC2, "waveDir")
41  .push_constant(Type::VEC2, "waveOffset")
42  .push_constant(Type::FLOAT, "wavePhase")
43  .push_constant(Type::VEC2, "swirlCenter")
44  .push_constant(Type::FLOAT, "swirlAngle")
45  .push_constant(Type::FLOAT, "swirlRadius")
46  .additional_info("gpencil_fx_common", "draw_fullscreen");
47 
48 GPU_SHADER_CREATE_INFO(gpencil_fx_glow)
49  .do_static_compilation(true)
50  .define("GLOW")
51  .push_constant(Type::VEC4, "glowColor")
52  .push_constant(Type::VEC2, "offset")
53  .push_constant(Type::INT, "sampCount")
54  .push_constant(Type::VEC4, "threshold")
55  .push_constant(Type::BOOL, "firstPass")
56  .push_constant(Type::BOOL, "glowUnder")
57  .push_constant(Type::INT, "blendMode")
58  .additional_info("gpencil_fx_common", "draw_fullscreen");
59 
60 GPU_SHADER_CREATE_INFO(gpencil_fx_rim)
61  .do_static_compilation(true)
62  .define("RIM")
63  .push_constant(Type::VEC2, "blurDir")
64  .push_constant(Type::VEC2, "uvOffset")
65  .push_constant(Type::VEC3, "rimColor")
66  .push_constant(Type::VEC3, "maskColor")
67  .push_constant(Type::INT, "sampCount")
68  .push_constant(Type::INT, "blendMode")
69  .push_constant(Type::BOOL, "isFirstPass")
70  .additional_info("gpencil_fx_common", "draw_fullscreen");
71 
72 GPU_SHADER_CREATE_INFO(gpencil_fx_shadow)
73  .do_static_compilation(true)
74  .define("SHADOW")
75  .push_constant(Type::VEC4, "shadowColor")
76  .push_constant(Type::VEC2, "uvRotX")
77  .push_constant(Type::VEC2, "uvRotY")
78  .push_constant(Type::VEC2, "uvOffset")
79  .push_constant(Type::VEC2, "blurDir")
80  .push_constant(Type::VEC2, "waveDir")
81  .push_constant(Type::VEC2, "waveOffset")
82  .push_constant(Type::FLOAT, "wavePhase")
83  .push_constant(Type::INT, "sampCount")
84  .push_constant(Type::BOOL, "isFirstPass")
85  .additional_info("gpencil_fx_common", "draw_fullscreen");
86 
87 GPU_SHADER_CREATE_INFO(gpencil_fx_pixelize)
88  .do_static_compilation(true)
89  .define("PIXELIZE")
90  .push_constant(Type::VEC2, "targetPixelSize")
91  .push_constant(Type::VEC2, "targetPixelOffset")
92  .push_constant(Type::VEC2, "accumOffset")
93  .push_constant(Type::INT, "sampCount")
94  .additional_info("gpencil_fx_common", "draw_fullscreen");
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT