Blender V5.0
compositor_smaa_infos.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(compositor_smaa_edge_detection)
9DEFINE("SMAA_GLSL_3")
10DEFINE_VALUE("SMAA_RT_METRICS",
11 "vec4(1.0f / vec2(textureSize(input_tx, 0)), vec2(textureSize(input_tx, 0)))")
12DEFINE_VALUE("SMAA_LUMA_WEIGHT", "vec4(luminance_coefficients, 0.0f)")
13DEFINE_VALUE("SMAA_THRESHOLD", "smaa_threshold")
14DEFINE_VALUE("SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR", "smaa_local_contrast_adaptation_factor")
15PUSH_CONSTANT(float3, luminance_coefficients)
16PUSH_CONSTANT(float, smaa_threshold)
17PUSH_CONSTANT(float, smaa_local_contrast_adaptation_factor)
18SAMPLER(0, sampler2D, input_tx)
19IMAGE(0, SFLOAT_16_16_16_16, write, image2D, edges_img)
20COMPUTE_SOURCE("compositor_smaa_edge_detection.glsl")
23
24GPU_SHADER_CREATE_INFO(compositor_smaa_blending_weight_calculation)
25LOCAL_GROUP_SIZE(16, 16)
26DEFINE("SMAA_GLSL_3")
27DEFINE_VALUE("SMAA_RT_METRICS",
28 "vec4(1.0f / vec2(textureSize(edges_tx, 0)), vec2(textureSize(edges_tx, 0)))")
29DEFINE_VALUE("SMAA_CORNER_ROUNDING", "smaa_corner_rounding")
30PUSH_CONSTANT(int, smaa_corner_rounding)
31SAMPLER(0, sampler2D, edges_tx)
32SAMPLER(1, sampler2D, area_tx)
33SAMPLER(2, sampler2D, search_tx)
34IMAGE(0, SFLOAT_16_16_16_16, write, image2D, weights_img)
35COMPUTE_SOURCE("compositor_smaa_blending_weight_calculation.glsl")
38
39GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_shared)
40LOCAL_GROUP_SIZE(16, 16)
41DEFINE("SMAA_GLSL_3")
42DEFINE_VALUE("SMAA_RT_METRICS",
43 "vec4(1.0f / vec2(textureSize(input_tx, 0)), vec2(textureSize(input_tx, 0)))")
44SAMPLER(0, sampler2D, input_tx)
45SAMPLER(1, sampler2D, weights_tx)
46COMPUTE_SOURCE("compositor_smaa_neighborhood_blending.glsl")
48
49GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float4)
50ADDITIONAL_INFO(compositor_smaa_neighborhood_blending_shared)
51IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
54
55GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float)
56ADDITIONAL_INFO(compositor_smaa_neighborhood_blending_shared)
57IMAGE(0, SFLOAT_16, write, image2D, output_img)
#define GPU_SHADER_CREATE_INFO(_info)
#define GPU_SHADER_CREATE_END()
#define SAMPLER(slot, type, name)
#define ADDITIONAL_INFO(info_name)
#define PUSH_CONSTANT(type, name)
#define DEFINE(name)
#define LOCAL_GROUP_SIZE(...)
#define IMAGE(slot, format, qualifiers, type, name)
#define COMPUTE_SOURCE(filename)
#define DO_STATIC_COMPILATION()
#define DEFINE_VALUE(name, value)
ImageBase< float, 2 > image2D
SamplerBase< float, 2 > sampler2D