Blender V5.3
compositor_realize_on_domain_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
5#ifdef GPU_SHADER
6# pragma once
7# include "gpu_shader_compat.hh"
8#endif
9
10#ifdef GLSL_CPP_STUBS
11# define SAMPLER_FUNCTION texture
12#endif
13
15
16/* -------
17 * Common.
18 * ------- */
19
20GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_shared)
21LOCAL_GROUP_SIZE(16, 16)
22PUSH_CONSTANT(float4x4, transformation)
23COMPUTE_SOURCE("compositor_realize_on_domain.glsl")
25
26/* -----------------------
27 * Float Nearest/Bilinear.
28 * ----------------------- */
29
30GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_nearest_bilinear_float_shared)
31ADDITIONAL_INFO(compositor_realize_on_domain_shared)
32SAMPLER(0, sampler2D, input_tx)
33COMPUTE_FUNCTION("realize_on_domain")
35
36GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_float)
37ADDITIONAL_INFO(compositor_realize_on_domain_nearest_bilinear_float_shared)
38IMAGE(0, SFLOAT_16, write, image2D, domain_img)
41
42GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_float2)
43ADDITIONAL_INFO(compositor_realize_on_domain_nearest_bilinear_float_shared)
44IMAGE(0, SFLOAT_16_16, write, image2D, domain_img)
47
48GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_float4)
49ADDITIONAL_INFO(compositor_realize_on_domain_nearest_bilinear_float_shared)
50IMAGE(0, SFLOAT_16_16_16_16, write, image2D, domain_img)
53
54/* --------
55 * Float4x4
56 * -------- */
57
58GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_float4x4)
59ADDITIONAL_INFO(compositor_realize_on_domain_shared)
60SAMPLER(0, sampler2DArray, input_tx)
61COMPUTE_FUNCTION("realize_on_domain_float4x4")
62IMAGE(0, SFLOAT_16_16_16_16, write, image2DArray, domain_img)
65
66/* --------------
67 * Float Bicubic.
68 * -------------- */
69
70GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_float_shared)
71ADDITIONAL_INFO(compositor_realize_on_domain_shared)
72SAMPLER(0, sampler2D, input_tx)
73COMPUTE_FUNCTION("realize_on_domain_bicubic")
75
76GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_float)
77ADDITIONAL_INFO(compositor_realize_on_domain_bicubic_float_shared)
78IMAGE(0, SFLOAT_16, write, image2D, domain_img)
81
82GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_float2)
83ADDITIONAL_INFO(compositor_realize_on_domain_bicubic_float_shared)
84IMAGE(0, SFLOAT_16_16, write, image2D, domain_img)
87
88GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_float4)
89ADDITIONAL_INFO(compositor_realize_on_domain_bicubic_float_shared)
90IMAGE(0, SFLOAT_16_16_16_16, write, image2D, domain_img)
93
94/* float4 Anisotropic */
95
96GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_anisotropic_float4)
97ADDITIONAL_INFO(compositor_realize_on_domain_shared)
98SAMPLER(0, sampler2D, input_tx)
99COMPUTE_FUNCTION("realize_on_domain_anisotropic")
100IMAGE(0, SFLOAT_16_16_16_16, write, image2D, domain_img)
103
104/* ----
105 * Int.
106 * ---- */
107
108GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_int_shared)
109ADDITIONAL_INFO(compositor_realize_on_domain_shared)
110SAMPLER(0, isampler2D, input_tx)
111COMPUTE_FUNCTION("realize_on_domain")
113
114GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_int)
115ADDITIONAL_INFO(compositor_realize_on_domain_int_shared)
116IMAGE(0, SINT_16, write, iimage2D, domain_img)
119
120GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_int2)
121ADDITIONAL_INFO(compositor_realize_on_domain_int_shared)
122IMAGE(0, SINT_16_16, write, iimage2D, domain_img)
125
126GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_int4)
127ADDITIONAL_INFO(compositor_realize_on_domain_int_shared)
128IMAGE(0, SINT_16_16_16_16, write, iimage2D, domain_img)
131
132GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bool)
133ADDITIONAL_INFO(compositor_realize_on_domain_int_shared)
134IMAGE(0, SINT_8, write, iimage2D, domain_img)
137
138GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_menu)
139ADDITIONAL_INFO(compositor_realize_on_domain_int_shared)
140IMAGE(0, SINT_8, write, iimage2D, domain_img)
@ SFLOAT_16_16_16_16
#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 COMPUTE_FUNCTION(function)
#define LOCAL_GROUP_SIZE(...)
#define IMAGE(slot, format, qualifiers, type, name)
#define COMPUTE_SOURCE(filename)
#define DO_STATIC_COMPILATION()
ImageBase< int, 2 > iimage2D
ImageBase< float, 2, true > image2DArray
ImageBase< float, 2 > image2D
MatBase< 4, 4 > float4x4
SamplerBase< int, 2 > isampler2D
SamplerBase< float, 2, false, true > sampler2DArray
SamplerBase< float, 2 > sampler2D