Blender  V3.3
workbench_effect_antialiasing_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 /* -------------------------------------------------------------------- */
9 GPU_SHADER_CREATE_INFO(workbench_taa)
10  .sampler(0, ImageType::FLOAT_2D, "colorBuffer")
11  .push_constant(Type::FLOAT, "samplesWeights", 9)
12  .fragment_out(0, Type::VEC4, "fragColor")
13  .fragment_source("workbench_effect_taa_frag.glsl")
14  .additional_info("draw_fullscreen")
15  .do_static_compilation(true);
16 
19 /* -------------------------------------------------------------------- */
23 GPU_SHADER_INTERFACE_INFO(workbench_smaa_iface, "")
24  .smooth(Type::VEC2, "uvs")
25  .smooth(Type::VEC2, "pixcoord")
26  .smooth(Type::VEC4, "offset[3]");
27 
28 GPU_SHADER_CREATE_INFO(workbench_smaa)
29  .define("SMAA_GLSL_3")
30  .define("SMAA_RT_METRICS", "viewportMetrics")
31  .define("SMAA_PRESET_HIGH")
32  .define("SMAA_LUMA_WEIGHT", "float4(1.0, 1.0, 1.0, 1.0)")
33  .define("SMAA_NO_DISCARD")
34  .vertex_out(workbench_smaa_iface)
35  .push_constant(Type::VEC4, "viewportMetrics")
36  .vertex_source("workbench_effect_smaa_vert.glsl")
37  .fragment_source("workbench_effect_smaa_frag.glsl");
38 
39 GPU_SHADER_CREATE_INFO(workbench_smaa_stage_0)
40  .define("SMAA_STAGE", "0")
41  .sampler(0, ImageType::FLOAT_2D, "colorTex")
42  .fragment_out(0, Type::VEC2, "out_edges")
43  .additional_info("workbench_smaa")
44  .do_static_compilation(true);
45 
46 GPU_SHADER_CREATE_INFO(workbench_smaa_stage_1)
47  .define("SMAA_STAGE", "1")
48  .sampler(0, ImageType::FLOAT_2D, "edgesTex")
49  .sampler(1, ImageType::FLOAT_2D, "areaTex")
50  .sampler(2, ImageType::FLOAT_2D, "searchTex")
51  .fragment_out(0, Type::VEC4, "out_weights")
52  .additional_info("workbench_smaa")
53  .do_static_compilation(true);
54 
55 GPU_SHADER_CREATE_INFO(workbench_smaa_stage_2)
56  .define("SMAA_STAGE", "2")
57  .sampler(0, ImageType::FLOAT_2D, "colorTex")
58  .sampler(1, ImageType::FLOAT_2D, "blendTex")
59  .push_constant(Type::FLOAT, "mixFactor")
60  .push_constant(Type::FLOAT, "taaAccumulatedWeight")
61  .fragment_out(0, Type::VEC4, "out_color")
62  .additional_info("workbench_smaa")
63  .do_static_compilation(true);
64 
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT