Blender V5.0
gpencil_shader.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "GPU_shader.hh"
12
13namespace blender::draw::gpencil {
14
16
18 private:
19 static gpu::StaticShaderCache<ShaderCache> &get_static_cache()
20 {
21 static gpu::StaticShaderCache<ShaderCache> static_cache;
22 return static_cache;
23 }
24
25 public:
26 static ShaderCache &get()
27 {
28 return get_static_cache().get();
29 }
30 static void release()
31 {
32 get_static_cache().release();
33 }
34
35 /* SMAA antialiasing */
36 StaticShader antialiasing[3] = {{"gpencil_antialiasing_stage_0"},
37 {"gpencil_antialiasing_stage_1"},
38 {"gpencil_antialiasing_stage_2"}};
39 /* Accumulation antialiasing */
40 StaticShader accumulation = {"gpencil_antialiasing_accumulation"};
41 /* GPencil Object rendering */
42 StaticShader geometry = {"gpencil_geometry"};
43 /* All layer blend types in one shader! */
44 StaticShader layer_blend = {"gpencil_layer_blend"};
45 /* Merge the final object depth to the depth buffer. */
46 StaticShader depth_merge = {"gpencil_depth_merge"};
47 /* Invert the content of the mask buffer. */
48 StaticShader mask_invert = {"gpencil_mask_invert"};
49 /* Effects. */
50 StaticShader fx_composite = {"gpencil_fx_composite"};
51 StaticShader fx_colorize = {"gpencil_fx_colorize"};
52 StaticShader fx_blur = {"gpencil_fx_blur"};
53 StaticShader fx_glow = {"gpencil_fx_glow"};
54 StaticShader fx_pixelize = {"gpencil_fx_pixelize"};
55 StaticShader fx_rim = {"gpencil_fx_rim"};
56 StaticShader fx_shadow = {"gpencil_fx_shadow"};
57 StaticShader fx_transform = {"gpencil_fx_transform"};
58};
59
60} // namespace blender::draw::gpencil
gpu::StaticShader StaticShader