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