Blender  V3.3
overlay_volume_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 /* -------------------------------------------------------------------- */
9 GPU_SHADER_INTERFACE_INFO(overlay_volume_velocity_iface, "").smooth(Type::VEC4, "finalColor");
10 
11 GPU_SHADER_CREATE_INFO(overlay_volume_velocity)
12  .do_static_compilation(true)
13  .sampler(0, ImageType::FLOAT_3D, "velocityX")
14  .sampler(1, ImageType::FLOAT_3D, "velocityY")
15  .sampler(2, ImageType::FLOAT_3D, "velocityZ")
16  .push_constant(Type::FLOAT, "displaySize")
17  .push_constant(Type::FLOAT, "slicePosition")
18  .push_constant(Type::INT, "sliceAxis")
19  .push_constant(Type::BOOL, "scaleWithMagnitude")
20  .push_constant(Type::BOOL, "isCellCentered")
21  /* FluidDomainSettings.cell_size */
22  .push_constant(Type::VEC3, "cellSize")
23  /* FluidDomainSettings.p0 */
24  .push_constant(Type::VEC3, "domainOriginOffset")
25  /* FluidDomainSettings.res_min */
26  .push_constant(Type::IVEC3, "adaptiveCellOffset")
27  .vertex_out(overlay_volume_velocity_iface)
28  .fragment_out(0, Type::VEC4, "fragColor")
29  .vertex_source("overlay_volume_velocity_vert.glsl")
30  .fragment_source("overlay_varying_color.glsl")
31  .additional_info("draw_volume");
32 
33 GPU_SHADER_CREATE_INFO(overlay_volume_velocity_mac)
34  .do_static_compilation(true)
35  .define("USE_MAC")
36  .push_constant(Type::BOOL, "drawMACX")
37  .push_constant(Type::BOOL, "drawMACY")
38  .push_constant(Type::BOOL, "drawMACZ")
39  .additional_info("overlay_volume_velocity");
40 
41 GPU_SHADER_CREATE_INFO(overlay_volume_velocity_needle)
42  .do_static_compilation(true)
43  .define("USE_NEEDLE")
44  .additional_info("overlay_volume_velocity");
45 
48 /* -------------------------------------------------------------------- */
52 GPU_SHADER_INTERFACE_INFO(overlay_volume_gridlines_iface, "").flat(Type::VEC4, "finalColor");
53 
54 GPU_SHADER_CREATE_INFO(overlay_volume_gridlines)
55  .do_static_compilation(true)
56  .push_constant(Type::FLOAT, "slicePosition")
57  .push_constant(Type::INT, "sliceAxis")
58  /* FluidDomainSettings.res */
59  .push_constant(Type::IVEC3, "volumeSize")
60  /* FluidDomainSettings.cell_size */
61  .push_constant(Type::VEC3, "cellSize")
62  /* FluidDomainSettings.p0 */
63  .push_constant(Type::VEC3, "domainOriginOffset")
64  /* FluidDomainSettings.res_min */
65  .push_constant(Type::IVEC3, "adaptiveCellOffset")
66  .vertex_out(overlay_volume_gridlines_iface)
67  .fragment_out(0, Type::VEC4, "fragColor")
68  .vertex_source("overlay_volume_gridlines_vert.glsl")
69  .fragment_source("overlay_varying_color.glsl")
70  .additional_info("draw_volume");
71 
72 GPU_SHADER_CREATE_INFO(overlay_volume_gridlines_flags)
73  .do_static_compilation(true)
74  .define("SHOW_FLAGS")
75  .sampler(0, ImageType::UINT_3D, "flagTexture")
76  .additional_info("overlay_volume_gridlines");
77 
78 GPU_SHADER_CREATE_INFO(overlay_volume_gridlines_range)
79  .do_static_compilation(true)
80  .define("SHOW_RANGE")
81  .push_constant(Type::FLOAT, "lowerBound")
82  .push_constant(Type::FLOAT, "upperBound")
83  .push_constant(Type::VEC4, "rangeColor")
84  .push_constant(Type::INT, "cellFilter")
85  .sampler(0, ImageType::UINT_3D, "flagTexture")
86  .sampler(1, ImageType::FLOAT_3D, "fieldTexture")
87  .additional_info("overlay_volume_gridlines");
88 
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT