Blender V4.3
workbench_effect_antialiasing_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
7/* -------------------------------------------------------------------- */
11GPU_SHADER_CREATE_INFO(workbench_taa)
12 .sampler(0, ImageType::FLOAT_2D, "colorBuffer")
13 .push_constant(Type::FLOAT, "samplesWeights", 9)
14 .fragment_out(0, Type::VEC4, "fragColor")
15 .fragment_source("workbench_effect_taa_frag.glsl")
16 .additional_info("draw_fullscreen")
17 .do_static_compilation(true);
18
21/* -------------------------------------------------------------------- */
25GPU_SHADER_INTERFACE_INFO(workbench_smaa_iface, "")
26 .smooth(Type::VEC2, "uvs")
27 .smooth(Type::VEC2, "pixcoord")
28 .smooth(Type::VEC4, "offset[3]");
29
30GPU_SHADER_CREATE_INFO(workbench_smaa)
31 .define("SMAA_GLSL_3")
32 .define("SMAA_RT_METRICS", "viewportMetrics")
33 .define("SMAA_PRESET_HIGH")
34 .define("SMAA_LUMA_WEIGHT", "float4(1.0, 1.0, 1.0, 1.0)")
35 .define("SMAA_NO_DISCARD")
36 .vertex_out(workbench_smaa_iface)
37 .push_constant(Type::VEC4, "viewportMetrics")
38 .vertex_source("workbench_effect_smaa_vert.glsl")
39 .fragment_source("workbench_effect_smaa_frag.glsl");
40
41GPU_SHADER_CREATE_INFO(workbench_smaa_stage_0)
42 .define("SMAA_STAGE", "0")
43 .sampler(0, ImageType::FLOAT_2D, "colorTex")
44 .fragment_out(0, Type::VEC2, "out_edges")
45 .additional_info("workbench_smaa")
46 .do_static_compilation(true);
47
48GPU_SHADER_CREATE_INFO(workbench_smaa_stage_1)
49 .define("SMAA_STAGE", "1")
50 .sampler(0, ImageType::FLOAT_2D, "edgesTex")
51 .sampler(1, ImageType::FLOAT_2D, "areaTex")
52 .sampler(2, ImageType::FLOAT_2D, "searchTex")
53 .fragment_out(0, Type::VEC4, "out_weights")
54 .additional_info("workbench_smaa")
55 .do_static_compilation(true);
56
57GPU_SHADER_CREATE_INFO(workbench_smaa_stage_2)
58 .define("SMAA_STAGE", "2")
59 .sampler(0, ImageType::FLOAT_2D, "colorTex")
60 .sampler(1, ImageType::FLOAT_2D, "blendTex")
61 .push_constant(Type::FLOAT, "mixFactor")
62 .push_constant(Type::FLOAT, "taaAccumulatedWeight")
63 .fragment_out(0, Type::VEC4, "out_color")
64 .additional_info("workbench_smaa")
65 .do_static_compilation(true);
66
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)