Skybox in 3D space.
More...
#include <GREM/graphics_3d/Sky3D.hpp>
◆ Mesh
◆ VertexShaderConstants
Struct of default vertex shader constants.
◆ VertexShaderOutputs
Struct of fields output by the default vertex shader.
◆ FragmentShaderOutputs
Struct of fields output by the default fragment shader.
◆ ParameterBuffer
Shader buffer for sky parameters.
◆ ShaderPipeline
Shader pipeline for drawing skyboxes.
◆ Sky3D() [1/2]
Construct a sky.
- Parameters
-
| device | device to create the sky for. Must outlive the sky. |
| options | sky options, see Sky3DOptions. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ Sky3D() [2/2]
Construct a pre-baked sky.
- Parameters
-
| device | device to create the sky for. Must outlive the sky. |
| radianceMap | pre-baked radiance map for sky color. Must be a valid sampled cube texture in an RGB(A) color format, or empty. |
| irradianceMap | pre-baked irradiance map for sky lighting. Must be a valid sampled cube texture in an RGB(A) color format, or empty. |
| reflectionMap | pre-baked reflection map for sky reflections. Must be a valid sampled cube texture in an RGB(A) color format, or empty. |
| options | sky options, see Sky3DOptions. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setSky() [1/2]
| void grem::graphics::Sky3D::setSky |
( |
const Sky3DOptions & | newOptions | ) |
|
Set the sky to the default invisible texture with new options.
- Parameters
-
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setSky() [2/2]
Set the sky to a pre-baked sky.
- Parameters
-
| newRadianceMap | pre-baked radiance map for sky color. Must be a valid sampled cube texture in an RGB(A) color format with straight alpha, or empty. |
| newIrradianceMap | pre-baked irradiance map for sky lighting. Must be a valid sampled cube texture in an RGB(A) color format with straight alpha, or empty. |
| newReflectionMap | pre-baked reflection map for sky reflections. Must be a valid sampled cube texture in an RGB(A) color format with straight alpha, or empty. |
| newOptions | sky options, see Sky3DOptions. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ getRadianceMap()
| const Texture & grem::graphics::Sky3D::getRadianceMap |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the radiance map of the sky.
- Returns
- a read-only reference to the radiance map cube texture, which will be empty if the sky has not been baked since its last modification.
◆ getIrradianceMap()
| const Texture & grem::graphics::Sky3D::getIrradianceMap |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the irradiance map of the sky.
- Returns
- a read-only reference to the irradiance map cube texture, which will be empty if the sky has not been baked since its last modification.
◆ getReflectionMap()
| const Texture & grem::graphics::Sky3D::getReflectionMap |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the reflection map of the sky.
- Returns
- a read-only reference to the reflection map cube texture, which will be empty if the sky has not been baked since its last modification.
◆ getOptions()
Get the configuration options of the sky.
- Returns
- the current configuration options.
◆ DEFAULT_VERTEX_SHADER_CONSTANTS
Default skybox vertex shader constants.
◆ DEFAULT_FRAGMENT_SHADER_CONSTANTS
Initial value:
Default skybox fragment shader constants.
◆ DEFAULT_SHADER_PIPELINE_OPTIONS
Initial value:{
}
@ 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
Default skybox graphics pipeline configuration.
The documentation for this class was generated from the following file: