4#ifndef GREM_GRAPHICS_3D_REFLECTION_PROBES_3D_HPP
5#define GREM_GRAPHICS_3D_REFLECTION_PROBES_3D_HPP
170 .maxAnisotropy = 1.0f,
261 return reflectionMaps;
287 GREM_API(graphics_3d)
void flushProbesAndTextures(
Device& device)
const;
288 GREM_API(graphics_3d)
void flush(
Device& device,
Renderer3D& renderer3D)
const;
292 mutable Texture reflectionMaps{};
293 mutable Buffer<ProbeFields> probes{};
294 mutable Buffer<float> worldSpaceBoxVolumes{};
297 mutable bool probesDirty =
false;
298 mutable bool texturesDirty =
false;
299 mutable bool buffersDirty =
true;
Definition ArrayList.hpp:27
Persistent system managing the rendering context of a Window.
Definition Device.hpp:68
System for pre-baking global illumination.
Definition LightBaker3D.hpp:134
UniformBuffer< AtlasParameters, "ReflectionProbes3DAtlases"> AtlasBuffer
Shader buffer for reflection probe atlases.
Definition ReflectionProbes3D.hpp:125
ReflectionProbes3DOptions getOptions() const noexcept
Get the configuration options of the reflection probe set.
Definition ReflectionProbes3D.hpp:279
StorageBuffer< ProbeFields, "LightProbeVolumes3DProbes"> ProbeBuffer
Shader buffer for reflection probes.
Definition ReflectionProbes3D.hpp:159
const Texture & getReflectionMaps() const noexcept
Get the reflection maps of the reflection probes.
Definition ReflectionProbes3D.hpp:260
Span< const ReflectionProbeOptions3D > getProbeOptions() const noexcept
Get the configuration options for the reflection probes in the set.
Definition ReflectionProbes3D.hpp:270
void addReflectionProbe(const ReflectionProbeOptions3D &options)
Add a reflection probe to the set.
ReflectionProbes3D(Device &device, Texture reflectionMaps, ArrayList< ReflectionProbeOptions3D > probeOptions, const ReflectionProbes3DOptions &options)
Construct a pre-baked set of reflection probes.
ReflectionProbes3D(Device &device, const ReflectionProbes3DOptions &options={})
Construct an empty set of reflection probes.
static constexpr TextureSamplerOptions REFLECTION_MAPS_SAMPLER_OPTIONS
Sampler options to use for the reflection maps of reflection probes.
Definition ReflectionProbes3D.hpp:164
void clearReflectionProbes() noexcept
Remove all reflection probes from the set.
void setReflectionProbes(const ReflectionProbes3DOptions &newOptions)
Set the reflection probe set to the default empty set with new options.
Backend-specific implementation of RenderPass.
Definition RenderPass.hpp:38
Persistent system that provides 3D rendering capabilities.
Definition Renderer3D.hpp:120
GPU memory buffer containing an array of structs to be read by a shader program.
Definition buffers.hpp:493
Storage for multidimensional data, such as 2D images, on the GPU, combined with a sampler configurati...
Definition Texture.hpp:700
Definition buffer_layouts.hpp:20
@ CLAMP_TO_EDGE
Clamp to the edge of the texture when sampling outside the 0-1 range.
Definition Texture.hpp:492
@ LINEAR
Interpolate between the two nearest mip levels to the displayed size.
Definition Texture.hpp:484
@ LINEAR
Interpolate between texels for a smoother appearance.
Definition Texture.hpp:475
qua< float > quat
Definition math.hpp:892
vec< 4, float > vec4
Definition math.hpp:440
vec< 3, float > vec3
Definition math.hpp:439
Configuration options for a reflection probe in a ReflectionProbes3D set.
Definition ReflectionProbes3D.hpp:27
vec3 blendWidthsOnNegativeSides
Size of the blend padding along each local axis on the local negative sides of the affected region.
Definition ReflectionProbes3D.hpp:65
quat orientation
Orientation of the reflection probe box in world space.
Definition ReflectionProbes3D.hpp:36
vec3 localAffectedRegionSize
Size of the local region of the reflection probe box where the reflection will be visible.
Definition ReflectionProbes3D.hpp:57
vec3 captureOffset
Offset of the reflection probe's capture position from the center of the box in world space.
Definition ReflectionProbes3D.hpp:79
vec3 center
Center position of the reflection probe box in world space.
Definition ReflectionProbes3D.hpp:31
vec3 size
Size of the reflection probe box along each local axis.
Definition ReflectionProbes3D.hpp:43
vec3 blendWidthsOnPositiveSides
Size of the blend padding along each local axis on the local positive sides of the affected region.
Definition ReflectionProbes3D.hpp:73
vec3 localAffectedRegionOffset
Offset of the center of the local region of the reflection probe box where the reflection will be vis...
Definition ReflectionProbes3D.hpp:49
Configuration options for a ReflectionProbes3D set.
Definition ReflectionProbes3D.hpp:85
constexpr bool operator==(const ReflectionProbes3DOptions &other) const noexcept=default
Compare these options to another set of options for equality.
uint32_t reflectionMapResolution
Width, in texels, of the reflection maps of reflection probes.
Definition ReflectionProbes3D.hpp:91
Struct of shader parameters representing the reflection probe atlases.
Definition ReflectionProbes3D.hpp:111
float reflectionProbesReflectionMapDetailLevelMax
Maximum mip level in the reflection maps of the reflection probes.
Definition ReflectionProbes3D.hpp:119
float reflectionProbesReflectionMapDetailLevelScale
Scale of the reflection probes reflection detail level.
Definition ReflectionProbes3D.hpp:116
samplerCubeArray reflectionProbesReflectionMaps
Sampler for the reflection maps of the reflection probes.
Definition ReflectionProbes3D.hpp:113
Struct of shader fields representing a reflection probe.
Definition ReflectionProbes3D.hpp:130
vec3 reflectionProbeCenter
Center position of the reflection probe box in world space.
Definition ReflectionProbes3D.hpp:132
vec3 reflectionProbeCaptureOffset
Offset of the reflection probe's capture position from the center of the box in world space.
Definition ReflectionProbes3D.hpp:153
vec3 reflectionProbeBlendWidthsOnNegativeSides
Size of the reflection probe box's blend padding along each local axis on the local negative sides of...
Definition ReflectionProbes3D.hpp:147
vec3 reflectionProbeBlendWidthsOnPositiveSides
Size of the reflection probe box's blend padding along each local axis on the local positive sides of...
Definition ReflectionProbes3D.hpp:150
vec3 reflectionProbeLocalAffectedRegionOffset
Offset of the center of the local region of the reflection probe box where the reflection will be vis...
Definition ReflectionProbes3D.hpp:141
vec3 reflectionProbeSize
Size of the reflection probe box along each local axis.
Definition ReflectionProbes3D.hpp:138
vec3 reflectionProbeLocalAffectedRegionSize
Size of the local region of the reflection probe box where the reflection will be visible.
Definition ReflectionProbes3D.hpp:144
vec4 reflectionProbeOrientation
Components of the quaternion representing the orientation of the reflection probe box in world space.
Definition ReflectionProbes3D.hpp:135
Configuration options for the sampler of a Texture.
Definition Texture.hpp:617
Reference to a samplerCubeArray Texture that may be used as a parameter value type in a shader-read b...
Definition ParameterDescription.hpp:179