4#ifndef GREM_GRAPHICS_3D_SKY_3D_HPP
5#define GREM_GRAPHICS_3D_SKY_3D_HPP
232 return irradianceMap;
243 return reflectionMap;
259 GREM_API(graphics_3d)
void flush(
Renderer3D& renderer3D)
const;
263 Texture irradianceMap{};
264 Texture reflectionMap{};
266 mutable bool parameterBufferDirty =
true;
Floating-point linear RGBA color in the Rec.
Definition Color.hpp:60
static const Color WHITE
Definition Color.hpp:215
Definition SharedPointer.hpp:65
Definition fundamentals.hpp:109
graphics::Mesh< Vertex, Index > Mesh
Cubemap mesh primitive type.
Definition Cubemap3D.hpp:33
Persistent system managing the rendering context of a Window.
Definition Device.hpp:68
System for pre-baking global illumination.
Definition LightBaker3D.hpp:134
Persistent system that provides 3D rendering capabilities.
Definition Renderer3D.hpp:120
Linked GPU shader pipeline.
Definition shaders.hpp:1508
Skybox in 3D space.
Definition Sky3D.hpp:81
Sky3D(Device &device, const Sky3DOptions &options={})
Construct a sky.
void setSky(const Sky3DOptions &newOptions)
Set the sky to the default invisible texture with new options.
static constexpr FragmentShaderConstants DEFAULT_FRAGMENT_SHADER_CONSTANTS
Default skybox fragment shader constants.
Definition Sky3D.hpp:137
void setSky(Texture newRadianceMap, Texture newIrradianceMap, Texture newReflectionMap, const Sky3DOptions &newOptions)
Set the sky to a pre-baked sky.
static constexpr VertexShaderConstants DEFAULT_VERTEX_SHADER_CONSTANTS
Default skybox vertex shader constants.
Definition Sky3D.hpp:134
UniformBuffer< Parameters, "Sky3DParameters"> ParameterBuffer
Shader buffer for sky parameters.
Definition Sky3D.hpp:128
Sky3DOptions getOptions() const noexcept
Get the configuration options of the sky.
Definition Sky3D.hpp:251
Cubemap3D::VertexShaderConstants VertexShaderConstants
Struct of default vertex shader constants.
Definition Sky3D.hpp:87
Cubemap3D::Mesh Mesh
Type of a skybox mesh.
Definition Sky3D.hpp:84
Cubemap3D::VertexShaderOutputs VertexShaderOutputs
Struct of fields output by the default vertex shader.
Definition Sky3D.hpp:90
graphics::ShaderPipeline< Mesh > ShaderPipeline
Shader pipeline for drawing skyboxes.
Definition Sky3D.hpp:131
const Texture & getReflectionMap() const noexcept
Get the reflection map of the sky.
Definition Sky3D.hpp:242
Sky3D(Device &device, Texture radianceMap, Texture irradianceMap, Texture reflectionMap, const Sky3DOptions &options)
Construct a pre-baked sky.
const Texture & getRadianceMap() const noexcept
Get the radiance map of the sky.
Definition Sky3D.hpp:220
Cubemap3D::FragmentShaderOutputs FragmentShaderOutputs
Struct of fields output by the default fragment shader.
Definition Sky3D.hpp:98
const Texture & getIrradianceMap() const noexcept
Get the irradiance map of the sky.
Definition Sky3D.hpp:231
static constexpr ShaderPipelineOptions DEFAULT_SHADER_PIPELINE_OPTIONS
Default skybox graphics pipeline configuration.
Definition Sky3D.hpp:142
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
@ NONE
Ignore facing, don't cull primitives based on their winding order.
Definition shaders.hpp:319
@ LESS_OR_EQUAL
The depth test passes if and only if the new depth value is less than or equal to the old depth value...
Definition shaders.hpp:108
vec< 4, float > vec4
Definition math.hpp:440
GREM_ALWAYS_INLINE void lock(Lockable1 &lock1, Lockable2 &lock2, LockableN &... lockN)
Definition synchronization.hpp:1268
Struct of fields output by the default fragment shader.
Definition Cubemap3D.hpp:44
Struct of default vertex shader constants.
Definition Cubemap3D.hpp:36
Struct of fields output by the default vertex shader.
Definition Cubemap3D.hpp:39
Configuration of a graphics pipeline.
Definition shaders.hpp:428
Filter parameters that determine which parts of a sky are drawn.
Definition Sky3D.hpp:272
bool skipSkyRendering
If set, the sky will not be directly rendered, but will still contribute to the lighting of other ren...
Definition Sky3D.hpp:277
Configuration options for a Sky3D.
Definition Sky3D.hpp:27
Color color
Tint color of the skybox.
Definition Sky3D.hpp:31
uint32_t reflectionMapResolution
Desired width, in texels, of the generated reflection cubemap, or 0 to disable specular reflections f...
Definition Sky3D.hpp:66
uint32_t irradianceMapResolution
Desired width, in texels, of the generated irradiance cubemap, or 0 to disable diffuse irradiance fro...
Definition Sky3D.hpp:58
Color reflectionColor
Reflection tint color produced by the skybox.
Definition Sky3D.hpp:41
constexpr bool operator==(const Sky3DOptions &other) const noexcept=default
Compare these options to another set of options for equality.
uint32_t radianceMapResolution
Desired width, in texels, of the generated radiance cubemap, or 0 to choose an appropriate resolution...
Definition Sky3D.hpp:50
Color ambientColor
Ambient light tint color produced by the skybox.
Definition Sky3D.hpp:36
Sky3DView(const Sky3D &sky, const Sky3D::ShaderPipeline &shaderPipelineOverride, const Sky3DFilter &filter={})
Construct a sky view with a shader override.
Definition Sky3D.hpp:310
Sky3DView(const Sky3D &sky, const Sky3DFilter &filter={})
Construct a sky view.
Definition Sky3D.hpp:299
const Sky3D * sky
Non-owning read-only pointer to the sky.
Definition Sky3D.hpp:285
Sky3DFilter filter
Filter parameters that determine which parts of the sky to draw.
Definition Sky3D.hpp:291
SharedPointer< ShaderPipelineImplementation > shaderPipelineOverrideHandle
Shader pipeline override to use, or nullptr to not use a shader override.
Definition Sky3D.hpp:288
Struct of default fragment shader constants.
Definition Sky3D.hpp:93
bool32_t SKY_HDR
Definition Sky3D.hpp:94
Struct of shader parameters representing the sky's appearance.
Definition Sky3D.hpp:101
samplerCube skyRadianceMap
Sampler for the skybox radiance map.
Definition Sky3D.hpp:103
samplerCube skyReflectionMap
Sampler for the skybox reflection map.
Definition Sky3D.hpp:109
vec4 skyAmbientColor
Tint color of the ambient light produced by the skybox.
Definition Sky3D.hpp:115
samplerCube skyIrradianceMap
Sampler for the skybox irradiance map.
Definition Sky3D.hpp:106
vec4 skyReflectionColor
Tint color of the reflections produced by the skybox.
Definition Sky3D.hpp:118
float skyReflectionMapDetailLevelMax
Maximum mip level in the skybox reflection map.
Definition Sky3D.hpp:124
vec4 skyColor
Tint color of the skybox.
Definition Sky3D.hpp:112
float skyReflectionMapDetailLevelScale
Scale of the skybox reflection detail level.
Definition Sky3D.hpp:121
Reference to a samplerCube Texture that may be used as a parameter value type in a shader-read buffer...
Definition ParameterDescription.hpp:163