GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::Renderer3D Class Reference

Persistent system that provides 3D rendering capabilities. More...

#include <GREM/graphics_3d/Renderer3D.hpp>

Classes

struct  PBRParameters
 Struct of shader parameters for PBR rendering. More...
struct  ScreenDecalFields
 Struct of shader fields representing an on-screen decal. More...
struct  ScreenLightFields
 Struct of shader fields representing an on-screen light source. More...
struct  ScreenTileParameters
 Struct of shader parameters representing the tiles of the screen. More...
struct  ScreenDepthBinParameters
 Struct of shader parameters representing the depth bins of the screen. More...
struct  ScreenItemFields
 Struct of shader fields representing an item belonging to a screen tile. More...
struct  ScreenParameters
 Struct of shader parameters representing the current screen. More...
struct  ShadowMapFragmentShaderOutputs
 Struct of fields output by the shadow map fragment shader. More...

Public Types

using Model2DTransformed3DVertexShader
 Default vertex shader for drawing 2D models with a 3D transformation.
using Model2DTransformed3DFragmentShader
 Default fragment shader for drawing 2D models with a 3D transformation.
using PBRParameterBuffer = UniformBuffer<PBRParameters, "Renderer3DPBRParameters">
 Shader buffer for PBR rendering parameters.
using ScreenDecalBuffer = StorageBuffer<ScreenDecalFields, "Renderer3DScreenDecals">
 Shader buffer for on-screen decals.
using ScreenLightBuffer = StorageBuffer<ScreenLightFields, "Renderer3DScreenLights">
 Shader buffer for on-screen lights.
using ScreenTileBuffer = UniformBuffer<ScreenTileParameters, "Renderer3DScreenTiles">
 Shader buffer for screen tiles.
using ScreenDepthBinBuffer = UniformBuffer<ScreenDepthBinParameters, "Renderer3DScreenDepthBins">
 Shader buffer for screen depth bins.
using ScreenItemBuffer = StorageBuffer<ScreenItemFields, "Renderer3DScreenItems">
 Shader buffer for screen items.
using ScreenParameterBuffer = UniformBuffer<ScreenParameters, "Renderer3DScreenParameters">
 Shader buffer for screen parameters.
using EnvironmentBuffers
 Set of shader buffers related to the environment.
using ScreenBuffers = BufferSet<ScreenTileBuffer, ScreenDepthBinBuffer, ScreenItemBuffer, ScreenDecalBuffer, ScreenLightBuffer, ScreenParameterBuffer>
 Set of shader buffers related to the screen.
using DefaultModel3DVertexShader = Model3D::VertexShader
 Default vertex shader type for drawing 3D models.
using UnlitModel3DFragmentShader = Model3D::FragmentShader
 Default fragment shader type for drawing 3D models at full brightness without any lighting.
using UnlitModel3DShaderPipelineSet = Model3D::ShaderPipelineSet
 Default shader pipeline set for drawing 3D models at full brightness without any lighting.
using PBRModel3DFragmentShader
 Default fragment shader type for drawing 3D models using PBR.
using PBRModel3DShaderPipelineSet
 Default shader pipeline set for drawing 3D models using PBR.
using DefaultSky3DVertexShader = VertexShader<Sky3D::Mesh, Sky3D::VertexShaderConstants, Sky3D::VertexShaderOutputs, Camera3D::ParameterBuffer>
 Default vertex shader for drawing skyboxes.
using UnlitSky3DFragmentShader
 Default fragment shader for drawing skyboxes without fog.
using PBRSky3DFragmentShader
 Default fragment shader for drawing skyboxes using PBR.
using ShadowMapModel3DFragmentShader = Model3D::FragmentShaderBase<Model3D::VertexShaderOutputs, Model3D::FragmentShaderConstants, ShadowMapFragmentShaderOutputs>
 Default fragment shader for drawing 3D models to shadow maps.
using ShadowMapModel3DShaderPipelineSet
 Shader pipeline set for drawing 3D models to shadow maps.
using DistanceModel3DFragmentShader = Model3D::FragmentShader
 Default fragment shader for drawing the distance of 3D models from the camera.
using DistanceModel3DShaderPipelineSet = Model3D::ShaderPipelineSet
 Shader pipeline set for drawing the distance of 3D models from the camera.

Public Member Functions

 Renderer3D (Device &device, Renderer2D &renderer2D, const Renderer3DOptions &options={})
 Construct a 3D renderer.
 ~Renderer3D ()
 Destructor.
 Renderer3D (const Renderer3D &)=delete
 Copying a renderer is not allowed.
 Renderer3D (Renderer3D &&)=delete
 Moving a renderer is not allowed.
Renderer3D & operator= (const Renderer3D &)=delete
 Copying a renderer is not allowed.
Renderer3D & operator= (Renderer3D &&)=delete
 Moving a renderer is not allowed.
template<typename... ExtraBuffers>
void drawUnlitFrame (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches to a render pass, without any environment buffers provided.
template<typename... ExtraBuffers>
void drawUnlitUnorderedFrame (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches to a render pass, without any environment buffers provided, and without sorting alpha-blended instances by their distance to the camera.
template<typename... ExtraBuffers>
void drawUnlitFrameWithSky (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, Sky3DView sky, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided.
template<typename... ExtraBuffers>
void drawUnlitUnorderedFrameWithSky (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, Sky3DView sky, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided, and without sorting alpha-blended instances by their distance to the camera.
template<typename... ExtraBuffers>
void drawHDRUnlitFrameWithSky (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, Sky3DView sky, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided, and without tonemapping when drawing the sky.
template<typename... ExtraBuffers>
void drawHDRUnlitUnorderedFrameWithSky (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, Sky3DView sky, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided, and without sorting alpha-blended instances by their distance to the camera, and without tonemapping when drawing the sky.
template<typename... ExtraBuffers>
void drawPBRFrame (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, const Fog3D &fog, Sky3DView sky, const Decals3D &decals, const Lights3D &lights, const LightProbeVolumes3D &lightProbeVolumes, const ReflectionProbes3D &reflectionProbes, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches to a render pass.
template<typename... ExtraBuffers>
void drawPBRUnorderedFrame (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, const Fog3D &fog, Sky3DView sky, const Decals3D &decals, const Lights3D &lights, const LightProbeVolumes3D &lightProbeVolumes, const ReflectionProbes3D &reflectionProbes, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches to a render pass, without sorting alpha-blended instances by their distance to the camera.
template<typename... ExtraBuffers>
void drawHDRPBRFrame (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, const Fog3D &fog, Sky3DView sky, const Decals3D &decals, const Lights3D &lights, const LightProbeVolumes3D &lightProbeVolumes, const ReflectionProbes3D &reflectionProbes, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches to a render pass, without tonemapping when drawing the sky.
template<typename... ExtraBuffers>
void drawHDRPBRUnorderedFrame (RenderPass &renderPass, StridedSpan< const Instances3DView > instanceBatches, const Camera3D &camera, const Fog3D &fog, Sky3DView sky, const Decals3D &decals, const Lights3D &lights, const LightProbeVolumes3D &lightProbeVolumes, const ReflectionProbes3D &reflectionProbes, const ExtraBuffers &... extraBuffers)
 Push the draw commands of a frame of 3D instance batches to a render pass, without sorting alpha-blended instances by their distance to the camera, and without tonemapping when drawing the sky.
const Texture & getInvisibleTexture2D ()
 Get the default invisible 2D texture.
const Texture & getInvisibleTexture2DArray ()
 Get the default invisible 2D array texture.
const Texture & getInvisibleTextureCube ()
 Get the default invisible cube texture.
const Texture & getInvisibleTextureCubeArray ()
 Get the default invisible cube array texture.
const Texture & getWhiteTexture2D ()
 Get the default white 2D texture.
const Texture & getWhiteTextureCube ()
 Get the default white cubemap texture.
const Texture & getFlatNormalTexture2D ()
 Get the default flat normal map 2D texture.
const Texture & getDefaultDepthTexture2D ()
 Get the default 2D depth texture.
const Texture & getDefaultDepthTexture2DArray ()
 Get the default 2D array depth texture.
const Texture & getDefaultDepthTextureCube ()
 Get the default cube depth texture.
const Texture & getDefaultDepthTextureCubeArray ()
 Get the default cube array depth texture.
const Renderer2D::DefaultModel2DVertexShader & getDefaultModel2DVertexShader ()
 Get the default 2D model vertex shader.
const Renderer2D::PlainModel2DFragmentShader & getPlainModel2DFragmentShader ()
 Get the default plain 2D model fragment shader.
const Model2D::ShaderPipeline & getPlainModel2DShaderPipeline ()
 Get the default plain 2D model shader pipeline.
const Renderer2D::TextModel2DFragmentShader & getTextModel2DFragmentShader ()
 Get the default text fragment shader.
const Model2D::ShaderPipeline & getTextModel2DShaderPipeline ()
 Get the default text shader pipeline.
const Renderer2D::TonemappingModel2DFragmentShader & getTonemappingModel2DFragmentShader ()
 Get the default tonemapping fragment shader.
const Model2D::ShaderPipeline & getTonemappingModel2DShaderPipeline ()
 Get the default tonemapping shader pipeline.
const Model2D & getUnitSquareModel2D () const noexcept
 Get the default 2D unit square model, which holds a single mesh that forms a square using a triangle strip of 2 triangles, consisting of 4 vertices in total with the following positions (and identical texture coordinates):
const Model2D & getUnitRightAngledTriangleModel2D () const noexcept
 Get the default 2D unit right-angled triangle model, which holds a single mesh that forms a single triangle, consisting of 3 vertices in total with the following positions (and identical texture coordinates):
const Model3D::DataBuffers & getModel3DDataBuffers ()
 Get the set of 3D model data buffers.
RangeAllocation< uint32_t > uploadModel3DInverseBindPoseMatrices (Span< const Model3D::InverseBindPoseMatrixFields > inverseBindPoseMatrices)
 Allocate a range of matrices and upload their values to the 3D model inverse bind-pose matrix buffer.
void reacquireModel3DInverseBindPoseMatrices (RangeAllocation< uint32_t > allocation) noexcept
 Increment the reference count of an allocated range of 3D model inverse bind-pose matrices.
void releaseModel3DInverseBindPoseMatrices (RangeAllocation< uint32_t > allocation) noexcept
 Decrement the reference count of an allocated range of 3D model inverse bind-pose matrices, and deallocate the range if the count reaches 0.
RangeAllocation< uint32_t > uploadModel3DMorphTargetValues (Span< const Model3D::MorphTargetValueFields > morphTargetValues)
 Allocate a range of morph targets and upload their values to the 3D model morph target value buffer.
void reacquireModel3DMorphTargetValues (RangeAllocation< uint32_t > allocation) noexcept
 Increment the reference count of an allocated range of 3D model morph target values.
void releaseModel3DMorphTargetValues (RangeAllocation< uint32_t > allocation) noexcept
 Decrement the reference count of an allocated range of 3D model morph target values, and deallocate the range if the count reaches 0.
const Model2DTransformed3DVertexShader & getDefault3DTransformedModel2DVertexShader ()
 Get the default 2D-model-in-3D vertex shader.
const Model2DTransformed3DFragmentShader & getPlain3DTransformedModel2DFragmentShader ()
 Get the default plain 2D-model-in-3D fragment shader.
const ShaderPipeline< Model2D::Mesh > & getPlain3DTransformedModel2DShaderPipeline ()
 Get the default plain 2D-model-in-3D shader pipeline.
const Model2DTransformed3DFragmentShader & getPlain3DTransformedTextFragmentShader ()
 Get the default plain 3D text fragment shader.
const ShaderPipeline< Model2D::Mesh > & getPlain3DTransformedTextShaderPipeline ()
 Get the default plain 3D text shader pipeline.
const DefaultModel3DVertexShader & getDefaultModel3DVertexShader ()
 Get the default 3D model vertex shader.
const UnlitModel3DFragmentShader & getUnlitModel3DFragmentShader ()
 Get the default unlit 3D model fragment shader, which renders models' base color at full brightness without any lighting.
UnlitModel3DShaderPipelineSet & getUnlitModel3DShaderPipelineSet ()
 Get the default unlit 3D model shader pipeline set, which renders models' base color at full brightness without any lighting.
UnlitModel3DShaderPipelineSet & getHDRUnlitModel3DShaderPipelineSet ()
 Get the default non-tonemapped unlit 3D model shader pipeline set, intended for high-dynamic-range render targets, which renders models' base color at full brightness without any lighting.
UnlitModel3DShaderPipelineSet & getWireframeModel3DShaderPipelineSet ()
 Get the default wireframe 3D model shader pipeline set, which renders the wireframe of models in their base color at full brightness without any lighting.
UnlitModel3DShaderPipelineSet & getHDRWireframeModel3DShaderPipelineSet ()
 Get the default non-tonemapped wireframe 3D model shader pipeline set, intended for high-dynamic-range render targets, which renders the wireframe of models in their base color at full brightness without any lighting.
const PBRModel3DFragmentShader & getPBRModel3DFragmentShader ()
 Get the default PBR 3D model fragment shader, which renders models using physically based rendering principles given the lighting from the environment.
PBRModel3DShaderPipelineSet::FragmentShaderSelector getPBRModel3DFragmentShaderSelector ()
 Get the default PBR 3D model fragment shader selector, which renders models using physically based rendering principles given the lighting from the environment, unless the shader configuration's material type is specified as unlit.
PBRModel3DShaderPipelineSet & getPBRModel3DShaderPipelineSet ()
 Get the default PBR 3D model shader pipeline set, which renders models using physically based rendering principles given the lighting from the environment.
PBRModel3DShaderPipelineSet & getHDRPBRModel3DShaderPipelineSet ()
 Get the default non-tonemapped PBR 3D model shader pipeline set, intended for high-dynamic-range render targets, which renders models using physically based rendering principles given the lighting from the environment.
ShadowMapModel3DShaderPipelineSet & getShadowMapModel3DShaderPipelineSet ()
 Get the default shadow map 3D model shader pipeline set, which renders models to the depth buffer, without outputting any color.
DistanceModel3DShaderPipelineSet & getDistanceModel3DShaderPipelineSet ()
 Get the default distance 3D model shader pipeline set, which renders models' distance from the camera to the red channel of the output color, with backface culling disabled.
const DefaultSky3DVertexShader & getDefaultSky3DVertexShader ()
 Get the default skybox vertex shader.
const UnlitSky3DFragmentShader & getUnlitSky3DFragmentShader ()
 Get the default unlit skybox fragment shader.
const Sky3D::ShaderPipeline & getUnlitSky3DShaderPipeline ()
 Get the default unlit skybox shader pipeline.
const Sky3D::ShaderPipeline & getHDRUnlitSky3DShaderPipeline ()
 Get the default non-tonemapped unlit skybox shader pipeline.
const PBRSky3DFragmentShader & getPBRSky3DFragmentShader ()
 Get the default PBR skybox fragment shader.
const Sky3D::ShaderPipeline & getPBRSky3DShaderPipeline ()
 Get the default PBR skybox shader pipeline.
const Sky3D::ShaderPipeline & getHDRPBRSky3DShaderPipeline ()
 Get the default non-tonemapped PBR skybox shader pipeline.
const Model3D & getCubeModel3D () const noexcept
 Get the default 3D cube model.
const Cubemap3D & getCubemap3D () const noexcept
 Get the default 3D cubemap.
const Texture & getSpecularSplitSumBRDFIntegrationMap ()
 Get the default BRDF integration map for split-sum approximation of ambient specular reflections.
void renderShadowMap (Lights3D &lights, LightID lightID, const Box< 3, float > &totalShadowCasterBoundingBox, const mat4 &observerProjectionMatrix, const mat4 &observerViewMatrix, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Render the shadow map of a specific shadow mapped light source in a set of lights with respect to a future observer.
void renderShadowMap (Lights3D &lights, LightID lightID, const Box< 3, float > &totalShadowCasterBoundingBox, const Camera3D &observerCamera, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Render the shadow map of a specific shadow mapped light source in a set of lights with respect to a future observer.
void renderAllShadowMaps (Lights3D &lights, const Box< 3, float > &totalShadowCasterBoundingBox, const mat4 &observerProjectionMatrix, const mat4 &observerViewMatrix, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Render the shadow maps of shadow mapped light sources in a set of lights with respect to a future observer.
void renderAllShadowMaps (Lights3D &lights, const Box< 3, float > &totalShadowCasterBoundingBox, const Camera3D &observerCamera, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Render the shadow maps of shadow mapped light sources in a set of lights with respect to a future observer.
void renderViewIndependentShadowMap (Lights3D &lights, LightID lightID, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow map of a specific shadow mapped view- independent light source in a set of lights.
void renderAllViewIndependentShadowMaps (Lights3D &lights, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow maps of all shadow mapped view-independent light sources in a set of lights.
void renderViewDependentShadowMap (Lights3D &lights, LightID lightID, const Box< 3, float > &totalShadowCasterBoundingBox, const mat4 &observerProjectionMatrix, const mat4 &observerViewMatrix, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow map of a specific shadow mapped view- dependent light source in a set of lights with respect to a future observer.
void renderViewDependentShadowMap (Lights3D &lights, LightID lightID, const Box< 3, float > &totalShadowCasterBoundingBox, const Camera3D &observerCamera, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow map of a specific shadow mapped view- dependent light source in a set of lights with respect to a future observer.
void renderAllViewDependentShadowMaps (Lights3D &lights, const Box< 3, float > &totalShadowCasterBoundingBox, const mat4 &observerProjectionMatrix, const mat4 &observerViewMatrix, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Render the shadow maps of all shadow mapped view-dependent light sources in a set of lights with respect to a future observer.
void renderAllViewDependentShadowMaps (Lights3D &lights, const Box< 3, float > &totalShadowCasterBoundingBox, const Camera3D &observerCamera, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Render the shadow maps of shadow mapped view-dependent light sources in a set of lights with respect to a future observer.
void renderViewDependentShadowMapForFullZoomedOutView (Lights3D &lights, LightID lightID, const Box< 3, float > &totalShadowCasterBoundingBox, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow map of a specific shadow mapped view- dependent light source in a set of lights to cover the entire scene at the same quality for all cascade levels.
void renderAllViewDependentShadowMapsForFullZoomedOutView (Lights3D &lights, const Box< 3, float > &totalShadowCasterBoundingBox, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow maps of all shadow mapped view- dependent light sources in a set of lights to cover the entire scene at the same quality for all cascade levels.
void renderAllShadowMapsForFullZoomedOutView (Lights3D &lights, const Box< 3, float > &totalShadowCasterBoundingBox, FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters)
 Unconditionally render the shadow maps of all shadow mapped light sources in a set of lights, such that any view-dependent shadow maps cover the entire scene at the same quality for all cascade levels.

Detailed Description

Persistent system that provides 3D rendering capabilities.

Member Typedef Documentation

◆ Model2DTransformed3DVertexShader

◆ Model2DTransformed3DFragmentShader

Initial value:
UniformBuffer< Parameters, "Camera3DParameters"> ParameterBuffer
Shader buffer for 3D camera parameters.
Definition Camera3D.hpp:191
Compiled GPU fragment shader stage.
Definition shaders.hpp:1274
UniformBuffer< TextureParameters, "Model2DTexture"> TextureBuffer
Shader buffer for 2D model texture parameters.
Definition Model2D.hpp:97
graphics::Mesh< Vertex, NoIndex, NoParameters, Instance > Mesh
Type of a single mesh of a 2D model.
Definition Model2D.hpp:59
UniformBuffer< Transformation3DParameters, "Model2DTransformation3D"> Transformation3DBuffer
Shader buffer for 2D model 3D transformation parameters.
Definition Model2D.hpp:109
Struct of default fragment shader constants.
Definition Model2D.hpp:78
Struct of fields output by the default fragment shader.
Definition Model2D.hpp:83
Struct of fields output by the default vertex shader.
Definition Model2D.hpp:69

Default fragment shader for drawing 2D models with a 3D transformation.

◆ PBRParameterBuffer

Shader buffer for PBR rendering parameters.

◆ ScreenDecalBuffer

Shader buffer for on-screen decals.

◆ ScreenLightBuffer

Shader buffer for on-screen lights.

◆ ScreenTileBuffer

Shader buffer for screen tiles.

◆ ScreenDepthBinBuffer

Shader buffer for screen depth bins.

◆ ScreenItemBuffer

Shader buffer for screen items.

◆ ScreenParameterBuffer

Shader buffer for screen parameters.

◆ EnvironmentBuffers

Initial value:
Collection of GPU memory buffers to be read by a shader.
Definition buffers.hpp:580
UniformBuffer< Parameters, "Decals3DParameters"> ParameterBuffer
Shader buffer for decal parameters.
Definition Decals3D.hpp:264
UniformBuffer< Parameters, "Fog3DParameters"> ParameterBuffer
Shader buffer for fog parameters.
Definition Fog3D.hpp:115
UniformBuffer< AtlasParameters, "LightProbeVolumes3DAtlases"> AtlasBuffer
Shader buffer for light probe volume atlases.
Definition LightProbeVolumes3D.hpp:105
StorageBuffer< VolumeFields, "LightProbeVolumes3DVolumes"> VolumeBuffer
Shader buffer for light probe volumes.
Definition LightProbeVolumes3D.hpp:139
StorageBuffer< ShadowMatrixFields, "Lights3DShadowMatrices"> ShadowMatrixBuffer
Shader buffer for shadow matrices.
Definition Lights3D.hpp:390
UniformBuffer< Parameters, "Lights3DParameters"> ParameterBuffer
Shader buffer for light parameters.
Definition Lights3D.hpp:381
UniformBuffer< AtlasParameters, "ReflectionProbes3DAtlases"> AtlasBuffer
Shader buffer for reflection probe atlases.
Definition ReflectionProbes3D.hpp:125
StorageBuffer< ProbeFields, "LightProbeVolumes3DProbes"> ProbeBuffer
Shader buffer for reflection probes.
Definition ReflectionProbes3D.hpp:159
UniformBuffer< PBRParameters, "Renderer3DPBRParameters"> PBRParameterBuffer
Shader buffer for PBR rendering parameters.
Definition Renderer3D.hpp:137
UniformBuffer< Parameters, "Sky3DParameters"> ParameterBuffer
Shader buffer for sky parameters.
Definition Sky3D.hpp:128

Set of shader buffers related to the environment.

◆ ScreenBuffers

◆ DefaultModel3DVertexShader

Default vertex shader type for drawing 3D models.

◆ UnlitModel3DFragmentShader

Default fragment shader type for drawing 3D models at full brightness without any lighting.

◆ UnlitModel3DShaderPipelineSet

Default shader pipeline set for drawing 3D models at full brightness without any lighting.

◆ PBRModel3DFragmentShader

Initial value:
graphics::FragmentShader< Mesh, Inputs, Constants, Outputs, Camera3D::ParameterBuffer, DataBuffers, InstanceBuffers, ExtraBuffers... > FragmentShaderBase
Fragment shader for drawing 3D models.
Definition Model3D.hpp:388

Default fragment shader type for drawing 3D models using PBR.

◆ PBRModel3DShaderPipelineSet

Initial value:
Shader pipeline set for drawing 3D models.
Definition Model3D.hpp:496
Struct of default fragment shader constants.
Definition Model3D.hpp:272
Struct of fields output by the default fragment shader.
Definition Model3D.hpp:292
Compile-time list of types.
Definition metaprogramming.hpp:347

Default shader pipeline set for drawing 3D models using PBR.

◆ DefaultSky3DVertexShader

◆ UnlitSky3DFragmentShader

◆ PBRSky3DFragmentShader

◆ ShadowMapModel3DFragmentShader

◆ ShadowMapModel3DShaderPipelineSet

◆ DistanceModel3DFragmentShader

Default fragment shader for drawing the distance of 3D models from the camera.

◆ DistanceModel3DShaderPipelineSet

Shader pipeline set for drawing the distance of 3D models from the camera.

Constructor & Destructor Documentation

◆ Renderer3D() [1/3]

grem::graphics::Renderer3D::Renderer3D ( Device & device,
Renderer2D & renderer2D,
const Renderer3DOptions & options = {} )

Construct a 3D renderer.

Parameters
devicedevice to create the renderer for. Must outlive the renderer.
renderer2Dsystem providing 2D rendering capabilities. Must outlive the renderer.
optionsinitial configuration of the renderer, see Renderer3DOptions.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ ~Renderer3D()

grem::graphics::Renderer3D::~Renderer3D ( )

Destructor.

◆ Renderer3D() [2/3]

grem::graphics::Renderer3D::Renderer3D ( const Renderer3D & )
delete

Copying a renderer is not allowed.

◆ Renderer3D() [3/3]

grem::graphics::Renderer3D::Renderer3D ( Renderer3D && )
delete

Moving a renderer is not allowed.

Member Function Documentation

◆ operator=() [1/2]

Renderer3D & grem::graphics::Renderer3D::operator= ( const Renderer3D & )
delete

Copying a renderer is not allowed.

◆ operator=() [2/2]

Renderer3D & grem::graphics::Renderer3D::operator= ( Renderer3D && )
delete

Moving a renderer is not allowed.

◆ drawUnlitFrame()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawUnlitFrame ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches to a render pass, without any environment buffers provided.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.
This function cannot be used with instance batches that contain any instances that use PBR shaders.

◆ drawUnlitUnorderedFrame()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawUnlitUnorderedFrame ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches to a render pass, without any environment buffers provided, and without sorting alpha-blended instances by their distance to the camera.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.
This function cannot be used with instance batches that contain any instances that use PBR shaders.

◆ drawUnlitFrameWithSky()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawUnlitFrameWithSky ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
Sky3DView sky,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
skysky of the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.
This function cannot be used with instance batches that contain any instances that use PBR shaders.

◆ drawUnlitUnorderedFrameWithSky()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawUnlitUnorderedFrameWithSky ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
Sky3DView sky,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided, and without sorting alpha-blended instances by their distance to the camera.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
skysky of the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.
This function cannot be used with instance batches that contain any instances that use PBR shaders.

◆ drawHDRUnlitFrameWithSky()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawHDRUnlitFrameWithSky ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
Sky3DView sky,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided, and without tonemapping when drawing the sky.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
skysky of the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.
This function cannot be used with instance batches that contain any instances that use PBR shaders.

◆ drawHDRUnlitUnorderedFrameWithSky()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawHDRUnlitUnorderedFrameWithSky ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
Sky3DView sky,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches and a 3D sky to a render pass, without any environment buffers provided, and without sorting alpha-blended instances by their distance to the camera, and without tonemapping when drawing the sky.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
skysky of the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.
This function cannot be used with instance batches that contain any instances that use PBR shaders.

◆ drawPBRFrame()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawPBRFrame ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
const Fog3D & fog,
Sky3DView sky,
const Decals3D & decals,
const Lights3D & lights,
const LightProbeVolumes3D & lightProbeVolumes,
const ReflectionProbes3D & reflectionProbes,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches to a render pass.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
fogdistance-based fog of the environment.
skysky of the environment.
decalsdecals in the environment.
lightsdirect light sources in the environment.
lightProbeVolumeslight probe volumes in the environment.
reflectionProbesreflection probes in the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.

◆ drawPBRUnorderedFrame()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawPBRUnorderedFrame ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
const Fog3D & fog,
Sky3DView sky,
const Decals3D & decals,
const Lights3D & lights,
const LightProbeVolumes3D & lightProbeVolumes,
const ReflectionProbes3D & reflectionProbes,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches to a render pass, without sorting alpha-blended instances by their distance to the camera.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
fogdistance-based fog of the environment.
skysky of the environment.
decalsdecals in the environment.
lightsdirect light sources in the environment.
lightProbeVolumeslight probe volumes in the environment.
reflectionProbesreflection probes in the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.

◆ drawHDRPBRFrame()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawHDRPBRFrame ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
const Fog3D & fog,
Sky3DView sky,
const Decals3D & decals,
const Lights3D & lights,
const LightProbeVolumes3D & lightProbeVolumes,
const ReflectionProbes3D & reflectionProbes,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches to a render pass, without tonemapping when drawing the sky.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
fogdistance-based fog of the environment.
skysky of the environment.
decalsdecals in the environment.
lightsdirect light sources in the environment.
lightProbeVolumeslight probe volumes in the environment.
reflectionProbesreflection probes in the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.

◆ drawHDRPBRUnorderedFrame()

template<typename... ExtraBuffers>
void grem::graphics::Renderer3D::drawHDRPBRUnorderedFrame ( RenderPass & renderPass,
StridedSpan< const Instances3DView > instanceBatches,
const Camera3D & camera,
const Fog3D & fog,
Sky3DView sky,
const Decals3D & decals,
const Lights3D & lights,
const LightProbeVolumes3D & lightProbeVolumes,
const ReflectionProbes3D & reflectionProbes,
const ExtraBuffers &... extraBuffers )
inline

Push the draw commands of a frame of 3D instance batches to a render pass, without sorting alpha-blended instances by their distance to the camera, and without tonemapping when drawing the sky.

Parameters
renderPassrender pass to push the draw commands to.
instanceBatchesread-only views over the instance batches to draw.
cameraperspective to render the instances from.
fogdistance-based fog of the environment.
skysky of the environment.
decalsdecals in the environment.
lightsdirect light sources in the environment.
lightProbeVolumeslight probe volumes in the environment.
reflectionProbesreflection probes in the environment.
extraBuffersextra buffers required by the shaders used in the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Warning
All extra buffers required by the shaders used in the batches must be provided through the parameter pack.

◆ getInvisibleTexture2D()

const Texture & grem::graphics::Renderer3D::getInvisibleTexture2D ( )
inlinenodiscard

Get the default invisible 2D texture.

Returns
a read-only reference to the invisible 2D texture.

◆ getInvisibleTexture2DArray()

const Texture & grem::graphics::Renderer3D::getInvisibleTexture2DArray ( )
inlinenodiscard

Get the default invisible 2D array texture.

Returns
a read-only reference to the invisible 2D array texture.

◆ getInvisibleTextureCube()

const Texture & grem::graphics::Renderer3D::getInvisibleTextureCube ( )
inlinenodiscard

Get the default invisible cube texture.

Returns
a read-only reference to the invisible cube texture.

◆ getInvisibleTextureCubeArray()

const Texture & grem::graphics::Renderer3D::getInvisibleTextureCubeArray ( )
inlinenodiscard

Get the default invisible cube array texture.

Returns
a read-only reference to the invisible cube array texture.

◆ getWhiteTexture2D()

const Texture & grem::graphics::Renderer3D::getWhiteTexture2D ( )
inlinenodiscard

Get the default white 2D texture.

Returns
a read-only reference to the white 2D texture.

◆ getWhiteTextureCube()

const Texture & grem::graphics::Renderer3D::getWhiteTextureCube ( )
inlinenodiscard

Get the default white cubemap texture.

Returns
a read-only reference to the white cubemap texture.

◆ getFlatNormalTexture2D()

const Texture & grem::graphics::Renderer3D::getFlatNormalTexture2D ( )
inlinenodiscard

Get the default flat normal map 2D texture.

Returns
a read-only reference to the flat normal map 2D texture.

◆ getDefaultDepthTexture2D()

const Texture & grem::graphics::Renderer3D::getDefaultDepthTexture2D ( )
inlinenodiscard

Get the default 2D depth texture.

Returns
a read-only reference to the default 2D depth texture.

◆ getDefaultDepthTexture2DArray()

const Texture & grem::graphics::Renderer3D::getDefaultDepthTexture2DArray ( )
inlinenodiscard

Get the default 2D array depth texture.

Returns
a read-only reference to the default 2D array depth texture.

◆ getDefaultDepthTextureCube()

const Texture & grem::graphics::Renderer3D::getDefaultDepthTextureCube ( )
inlinenodiscard

Get the default cube depth texture.

Returns
a read-only reference to the default cube depth texture.

◆ getDefaultDepthTextureCubeArray()

const Texture & grem::graphics::Renderer3D::getDefaultDepthTextureCubeArray ( )
inlinenodiscard

Get the default cube array depth texture.

Returns
a read-only reference to the default cube array depth texture.

◆ getDefaultModel2DVertexShader()

const Renderer2D::DefaultModel2DVertexShader & grem::graphics::Renderer3D::getDefaultModel2DVertexShader ( )
inlinenodiscard

Get the default 2D model vertex shader.

Returns
a read-only reference to the default 2D model vertex shader.

◆ getPlainModel2DFragmentShader()

const Renderer2D::PlainModel2DFragmentShader & grem::graphics::Renderer3D::getPlainModel2DFragmentShader ( )
inlinenodiscard

Get the default plain 2D model fragment shader.

Returns
a read-only reference to the plain 2D model fragment shader.

◆ getPlainModel2DShaderPipeline()

const Model2D::ShaderPipeline & grem::graphics::Renderer3D::getPlainModel2DShaderPipeline ( )
inlinenodiscard

Get the default plain 2D model shader pipeline.

Returns
a read-only reference to the plain 2D model shader pipeline.

◆ getTextModel2DFragmentShader()

const Renderer2D::TextModel2DFragmentShader & grem::graphics::Renderer3D::getTextModel2DFragmentShader ( )
inlinenodiscard

Get the default text fragment shader.

Returns
a read-only reference to the text fragment shader.

◆ getTextModel2DShaderPipeline()

const Model2D::ShaderPipeline & grem::graphics::Renderer3D::getTextModel2DShaderPipeline ( )
inlinenodiscard

Get the default text shader pipeline.

Returns
a read-only reference to the text shader pipeline.

◆ getTonemappingModel2DFragmentShader()

const Renderer2D::TonemappingModel2DFragmentShader & grem::graphics::Renderer3D::getTonemappingModel2DFragmentShader ( )
inlinenodiscard

Get the default tonemapping fragment shader.

Returns
a read-only reference to the tonemapping fragment shader.

◆ getTonemappingModel2DShaderPipeline()

const Model2D::ShaderPipeline & grem::graphics::Renderer3D::getTonemappingModel2DShaderPipeline ( )
inlinenodiscard

Get the default tonemapping shader pipeline.

Returns
a read-only reference to the tonemapping shader pipeline.

◆ getUnitSquareModel2D()

const Model2D & grem::graphics::Renderer3D::getUnitSquareModel2D ( ) const
inlinenodiscardnoexcept

Get the default 2D unit square model, which holds a single mesh that forms a square using a triangle strip of 2 triangles, consisting of 4 vertices in total with the following positions (and identical texture coordinates):

  • (0, 0)
  • (1, 0)
  • (0, 1)
  • (1, 1)
Returns
a read-only reference to the 2D unit square model.

◆ getUnitRightAngledTriangleModel2D()

const Model2D & grem::graphics::Renderer3D::getUnitRightAngledTriangleModel2D ( ) const
inlinenodiscardnoexcept

Get the default 2D unit right-angled triangle model, which holds a single mesh that forms a single triangle, consisting of 3 vertices in total with the following positions (and identical texture coordinates):

  • (0, 0)
  • (1, 0)
  • (0, 1)
Returns
a read-only reference to the 2D right-angled triangle model.

◆ getModel3DDataBuffers()

const Model3D::DataBuffers & grem::graphics::Renderer3D::getModel3DDataBuffers ( )
inlinenodiscard

Get the set of 3D model data buffers.

Returns
a read-only reference to the 3D model data buffer set.

◆ uploadModel3DInverseBindPoseMatrices()

RangeAllocation< uint32_t > grem::graphics::Renderer3D::uploadModel3DInverseBindPoseMatrices ( Span< const Model3D::InverseBindPoseMatrixFields > inverseBindPoseMatrices)
inlinenodiscard

Allocate a range of matrices and upload their values to the 3D model inverse bind-pose matrix buffer.

Parameters
inverseBindPoseMatricesinverse bind-pose matrices to upload.
Returns
the allocated range, which must be released using releaseModel3DInverseBindPoseMatrices().
Exceptions
graphics::Erroron failure to upload data.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
releaseModel3DInverseBindPoseMatrices()

◆ reacquireModel3DInverseBindPoseMatrices()

void grem::graphics::Renderer3D::reacquireModel3DInverseBindPoseMatrices ( RangeAllocation< uint32_t > allocation)
inlinenoexcept

Increment the reference count of an allocated range of 3D model inverse bind-pose matrices.

Parameters
allocationthe previously allocated range. Must be a valid range that was previously returned from uploadModel3DInverseBindPoseMatrices().
Warning
For each time this function is called, releaseModel3DInverseBindPoseMatrices() must be called one additional time for the given allocation.
See also
releaseModel3DInverseBindPoseMatrices()

◆ releaseModel3DInverseBindPoseMatrices()

void grem::graphics::Renderer3D::releaseModel3DInverseBindPoseMatrices ( RangeAllocation< uint32_t > allocation)
inlinenoexcept

Decrement the reference count of an allocated range of 3D model inverse bind-pose matrices, and deallocate the range if the count reaches 0.

Parameters
allocationthe previously allocated range. Must be a valid range that was previously returned from uploadModel3DInverseBindPoseMatrices(), or an empty range.
See also
uploadModel3DInverseBindPoseMatrices()

◆ uploadModel3DMorphTargetValues()

RangeAllocation< uint32_t > grem::graphics::Renderer3D::uploadModel3DMorphTargetValues ( Span< const Model3D::MorphTargetValueFields > morphTargetValues)
inlinenodiscard

Allocate a range of morph targets and upload their values to the 3D model morph target value buffer.

Parameters
morphTargetValuesmorph target values to upload.
Returns
the allocated range, which must be released using releaseModel3DMorphTargetValues().
Exceptions
graphics::Erroron failure to upload data.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
releaseModel3DMorphTargetValues()

◆ reacquireModel3DMorphTargetValues()

void grem::graphics::Renderer3D::reacquireModel3DMorphTargetValues ( RangeAllocation< uint32_t > allocation)
inlinenoexcept

Increment the reference count of an allocated range of 3D model morph target values.

Parameters
allocationthe previously allocated range. Must be a valid range that was previously returned from uploadModel3DMorphTargetValues().
Warning
For each time this function is called, releaseModel3DMorphTargetValues() must be called one additional time for the given allocation.
See also
releaseModel3DMorphTargetValues()

◆ releaseModel3DMorphTargetValues()

void grem::graphics::Renderer3D::releaseModel3DMorphTargetValues ( RangeAllocation< uint32_t > allocation)
inlinenoexcept

Decrement the reference count of an allocated range of 3D model morph target values, and deallocate the range if the count reaches 0.

Parameters
allocationthe previously allocated range. Must be a valid range that was previously returned from uploadModel3DMorphTargetValues(), or an empty range.
See also
uploadModel3DMorphTargetValues()

◆ getDefault3DTransformedModel2DVertexShader()

const Model2DTransformed3DVertexShader & grem::graphics::Renderer3D::getDefault3DTransformedModel2DVertexShader ( )
nodiscard

Get the default 2D-model-in-3D vertex shader.

Returns
a read-only reference to the default 2D-model-in-3D vertex shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPlain3DTransformedModel2DFragmentShader()

const Model2DTransformed3DFragmentShader & grem::graphics::Renderer3D::getPlain3DTransformedModel2DFragmentShader ( )
nodiscard

Get the default plain 2D-model-in-3D fragment shader.

Returns
a read-only reference to the plain 2D-model-in-3D fragment shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPlain3DTransformedModel2DShaderPipeline()

const ShaderPipeline< Model2D::Mesh > & grem::graphics::Renderer3D::getPlain3DTransformedModel2DShaderPipeline ( )
inlinenodiscard

Get the default plain 2D-model-in-3D shader pipeline.

Returns
a read-only reference to the plain 2D-model-in-3D shader pipeline.
Exceptions
graphics::Erroron failure to create the pipeline if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPlain3DTransformedTextFragmentShader()

const Model2DTransformed3DFragmentShader & grem::graphics::Renderer3D::getPlain3DTransformedTextFragmentShader ( )
nodiscard

Get the default plain 3D text fragment shader.

Returns
a read-only reference to the plain 3D text fragment shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPlain3DTransformedTextShaderPipeline()

const ShaderPipeline< Model2D::Mesh > & grem::graphics::Renderer3D::getPlain3DTransformedTextShaderPipeline ( )
inlinenodiscard

Get the default plain 3D text shader pipeline.

Returns
a read-only reference to the plain 3D text shader pipeline.
Exceptions
graphics::Erroron failure to create the pipeline if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getDefaultModel3DVertexShader()

const DefaultModel3DVertexShader & grem::graphics::Renderer3D::getDefaultModel3DVertexShader ( )
nodiscard

Get the default 3D model vertex shader.

Returns
a read-only reference to the default 3D model vertex shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getUnlitModel3DFragmentShader()

const UnlitModel3DFragmentShader & grem::graphics::Renderer3D::getUnlitModel3DFragmentShader ( )
nodiscard

Get the default unlit 3D model fragment shader, which renders models' base color at full brightness without any lighting.

Returns
a read-only reference to the unlit 3D model fragment shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getUnlitModel3DShaderPipelineSet()

UnlitModel3DShaderPipelineSet & grem::graphics::Renderer3D::getUnlitModel3DShaderPipelineSet ( )
inlinenodiscard

Get the default unlit 3D model shader pipeline set, which renders models' base color at full brightness without any lighting.

Returns
a reference to the unlit 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getHDRUnlitModel3DShaderPipelineSet()

UnlitModel3DShaderPipelineSet & grem::graphics::Renderer3D::getHDRUnlitModel3DShaderPipelineSet ( )
inlinenodiscard

Get the default non-tonemapped unlit 3D model shader pipeline set, intended for high-dynamic-range render targets, which renders models' base color at full brightness without any lighting.

Returns
a reference to the non-tonemapped unlit 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getWireframeModel3DShaderPipelineSet()

UnlitModel3DShaderPipelineSet & grem::graphics::Renderer3D::getWireframeModel3DShaderPipelineSet ( )
inlinenodiscard

Get the default wireframe 3D model shader pipeline set, which renders the wireframe of models in their base color at full brightness without any lighting.

Returns
a reference to the wireframe 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getHDRWireframeModel3DShaderPipelineSet()

UnlitModel3DShaderPipelineSet & grem::graphics::Renderer3D::getHDRWireframeModel3DShaderPipelineSet ( )
inlinenodiscard

Get the default non-tonemapped wireframe 3D model shader pipeline set, intended for high-dynamic-range render targets, which renders the wireframe of models in their base color at full brightness without any lighting.

Returns
a reference to the non-tonemapped wireframe 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPBRModel3DFragmentShader()

const PBRModel3DFragmentShader & grem::graphics::Renderer3D::getPBRModel3DFragmentShader ( )
nodiscard

Get the default PBR 3D model fragment shader, which renders models using physically based rendering principles given the lighting from the environment.

Returns
a read-only reference to the PBR 3D model fragment shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPBRModel3DFragmentShaderSelector()

PBRModel3DShaderPipelineSet::FragmentShaderSelector grem::graphics::Renderer3D::getPBRModel3DFragmentShaderSelector ( )
inlinenodiscard

Get the default PBR 3D model fragment shader selector, which renders models using physically based rendering principles given the lighting from the environment, unless the shader configuration's material type is specified as unlit.

Returns
a read-only reference to the PBR 3D model fragment shader selector.

◆ getPBRModel3DShaderPipelineSet()

PBRModel3DShaderPipelineSet & grem::graphics::Renderer3D::getPBRModel3DShaderPipelineSet ( )
inlinenodiscard

Get the default PBR 3D model shader pipeline set, which renders models using physically based rendering principles given the lighting from the environment.

Returns
a reference to the PBR 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getHDRPBRModel3DShaderPipelineSet()

PBRModel3DShaderPipelineSet & grem::graphics::Renderer3D::getHDRPBRModel3DShaderPipelineSet ( )
inlinenodiscard

Get the default non-tonemapped PBR 3D model shader pipeline set, intended for high-dynamic-range render targets, which renders models using physically based rendering principles given the lighting from the environment.

Returns
a reference to the non-tonemapped PBR 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getShadowMapModel3DShaderPipelineSet()

ShadowMapModel3DShaderPipelineSet & grem::graphics::Renderer3D::getShadowMapModel3DShaderPipelineSet ( )
nodiscard

Get the default shadow map 3D model shader pipeline set, which renders models to the depth buffer, without outputting any color.

Returns
a reference to the shadow map 3D model shader pipeline set.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getDistanceModel3DShaderPipelineSet()

DistanceModel3DShaderPipelineSet & grem::graphics::Renderer3D::getDistanceModel3DShaderPipelineSet ( )
nodiscard

Get the default distance 3D model shader pipeline set, which renders models' distance from the camera to the red channel of the output color, with backface culling disabled.

Returns
a reference to the distance 3D model shader pipeline set.
Warning
The distance fragment shader requires a DistanceParameters buffer to be provided when drawn.
Exceptions
graphics::Erroron failure to create the pipeline set if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getDefaultSky3DVertexShader()

const DefaultSky3DVertexShader & grem::graphics::Renderer3D::getDefaultSky3DVertexShader ( )
nodiscard

Get the default skybox vertex shader.

Returns
a read-only reference to the skybox vertex shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getUnlitSky3DFragmentShader()

const UnlitSky3DFragmentShader & grem::graphics::Renderer3D::getUnlitSky3DFragmentShader ( )
nodiscard

Get the default unlit skybox fragment shader.

Returns
a read-only reference to the unlit skybox fragment shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getUnlitSky3DShaderPipeline()

const Sky3D::ShaderPipeline & grem::graphics::Renderer3D::getUnlitSky3DShaderPipeline ( )
inlinenodiscard

Get the default unlit skybox shader pipeline.

Returns
a reference to the unlit skybox shader pipeline.
Exceptions
graphics::Erroron failure to create the pipeline if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getHDRUnlitSky3DShaderPipeline()

const Sky3D::ShaderPipeline & grem::graphics::Renderer3D::getHDRUnlitSky3DShaderPipeline ( )
inlinenodiscard

Get the default non-tonemapped unlit skybox shader pipeline.

Returns
a reference to the non-tonemapped unlit skybox shader pipeline.
Exceptions
graphics::Erroron failure to create the pipeline if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPBRSky3DFragmentShader()

const PBRSky3DFragmentShader & grem::graphics::Renderer3D::getPBRSky3DFragmentShader ( )
nodiscard

Get the default PBR skybox fragment shader.

Returns
a read-only reference to the PBR skybox fragment shader.
Exceptions
graphics::Erroron failure to create the shader if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getPBRSky3DShaderPipeline()

const Sky3D::ShaderPipeline & grem::graphics::Renderer3D::getPBRSky3DShaderPipeline ( )
inlinenodiscard

Get the default PBR skybox shader pipeline.

Returns
a reference to the PBR skybox shader pipeline.
Exceptions
graphics::Erroron failure to create the pipeline if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getHDRPBRSky3DShaderPipeline()

const Sky3D::ShaderPipeline & grem::graphics::Renderer3D::getHDRPBRSky3DShaderPipeline ( )
inlinenodiscard

Get the default non-tonemapped PBR skybox shader pipeline.

Returns
a reference to the non-tonemapped PBR skybox shader pipeline.
Exceptions
graphics::Erroron failure to create the pipeline if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getCubeModel3D()

const Model3D & grem::graphics::Renderer3D::getCubeModel3D ( ) const
inlinenodiscardnoexcept

Get the default 3D cube model.

Returns
a read-only reference to the 3D cube model.

◆ getCubemap3D()

const Cubemap3D & grem::graphics::Renderer3D::getCubemap3D ( ) const
inlinenodiscardnoexcept

Get the default 3D cubemap.

Returns
a read-only reference to the 3D cubemap.

◆ getSpecularSplitSumBRDFIntegrationMap()

const Texture & grem::graphics::Renderer3D::getSpecularSplitSumBRDFIntegrationMap ( )
inlinenodiscard

Get the default BRDF integration map for split-sum approximation of ambient specular reflections.

Returns
a read-only reference to the specular split-sum BRDF integration map.
Exceptions
graphics::Erroron failure to create the texture if it doesn't already exist.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderShadowMap() [1/2]

void grem::graphics::Renderer3D::renderShadowMap ( Lights3D & lights,
LightID lightID,
const Box< 3, float > & totalShadowCasterBoundingBox,
const mat4 & observerProjectionMatrix,
const mat4 & observerViewMatrix,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Render the shadow map of a specific shadow mapped light source in a set of lights with respect to a future observer.

Parameters
lightsset of lights containing the light to render the shadow map of.
lightIDhandle to the light whose shadow map to render.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerProjectionMatrixprojection matrix of the camera that will later be observing the rendered shadows.
observerViewMatrixview matrix of the camera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by the light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
If the given light handle is invalid, or not shadow mapped, this function has no effect.

◆ renderShadowMap() [2/2]

void grem::graphics::Renderer3D::renderShadowMap ( Lights3D & lights,
LightID lightID,
const Box< 3, float > & totalShadowCasterBoundingBox,
const Camera3D & observerCamera,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )
inline

Render the shadow map of a specific shadow mapped light source in a set of lights with respect to a future observer.

Parameters
lightsset of lights containing the light to render the shadow map of.
lightIDhandle to the light whose shadow map to render.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerCameracamera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by the light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
If the given light handle is invalid, or not shadow mapped, this function has no effect.

◆ renderAllShadowMaps() [1/2]

void grem::graphics::Renderer3D::renderAllShadowMaps ( Lights3D & lights,
const Box< 3, float > & totalShadowCasterBoundingBox,
const mat4 & observerProjectionMatrix,
const mat4 & observerViewMatrix,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Render the shadow maps of shadow mapped light sources in a set of lights with respect to a future observer.

Parameters
lightsset of lights to render the shadow maps of.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerProjectionMatrixprojection matrix of the camera that will later be observing the rendered shadows.
observerViewMatrixview matrix of the camera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderAllShadowMaps() [2/2]

void grem::graphics::Renderer3D::renderAllShadowMaps ( Lights3D & lights,
const Box< 3, float > & totalShadowCasterBoundingBox,
const Camera3D & observerCamera,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )
inline

Render the shadow maps of shadow mapped light sources in a set of lights with respect to a future observer.

Parameters
lightsset of lights to render the shadow maps of.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerCameracamera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderViewIndependentShadowMap()

void grem::graphics::Renderer3D::renderViewIndependentShadowMap ( Lights3D & lights,
LightID lightID,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Unconditionally render the shadow map of a specific shadow mapped view- independent light source in a set of lights.

Parameters
lightsset of lights containing the light to render the shadow map of.
lightIDhandle to the light whose shadow map to render.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by the light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
If the given light handle is invalid, not shadow mapped, or has a view-dependent shadow map type, this function has no effect.

◆ renderAllViewIndependentShadowMaps()

void grem::graphics::Renderer3D::renderAllViewIndependentShadowMaps ( Lights3D & lights,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Unconditionally render the shadow maps of all shadow mapped view-independent light sources in a set of lights.

Parameters
lightsset of lights to render the view-independent shadow maps of.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderViewDependentShadowMap() [1/2]

void grem::graphics::Renderer3D::renderViewDependentShadowMap ( Lights3D & lights,
LightID lightID,
const Box< 3, float > & totalShadowCasterBoundingBox,
const mat4 & observerProjectionMatrix,
const mat4 & observerViewMatrix,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Unconditionally render the shadow map of a specific shadow mapped view- dependent light source in a set of lights with respect to a future observer.

Parameters
lightsset of lights containing the light to render the shadow map of.
lightIDhandle to the light whose shadow map to render.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerProjectionMatrixprojection matrix of the camera that will later be observing the rendered shadows.
observerViewMatrixview matrix of the camera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
If the given light handle is invalid, not shadow mapped, or has a view-independent shadow map type, this function has no effect.

◆ renderViewDependentShadowMap() [2/2]

void grem::graphics::Renderer3D::renderViewDependentShadowMap ( Lights3D & lights,
LightID lightID,
const Box< 3, float > & totalShadowCasterBoundingBox,
const Camera3D & observerCamera,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )
inline

Unconditionally render the shadow map of a specific shadow mapped view- dependent light source in a set of lights with respect to a future observer.

Parameters
lightsset of lights containing the light to render the shadow map of.
lightIDhandle to the light whose shadow map to render.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerCameracamera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
If the given light handle is invalid, not shadow mapped, or has a view-independent shadow map type, this function has no effect.

◆ renderAllViewDependentShadowMaps() [1/2]

void grem::graphics::Renderer3D::renderAllViewDependentShadowMaps ( Lights3D & lights,
const Box< 3, float > & totalShadowCasterBoundingBox,
const mat4 & observerProjectionMatrix,
const mat4 & observerViewMatrix,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Render the shadow maps of all shadow mapped view-dependent light sources in a set of lights with respect to a future observer.

Parameters
lightsset of lights to render the cascaded shadow maps of.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerProjectionMatrixprojection matrix of the camera that will later be observing the rendered shadows.
observerViewMatrixview matrix of the camera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderAllViewDependentShadowMaps() [2/2]

void grem::graphics::Renderer3D::renderAllViewDependentShadowMaps ( Lights3D & lights,
const Box< 3, float > & totalShadowCasterBoundingBox,
const Camera3D & observerCamera,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )
inline

Render the shadow maps of shadow mapped view-dependent light sources in a set of lights with respect to a future observer.

Parameters
lightsset of lights to render the view-dependent shadow maps of.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
observerCameracamera that will later be observing the rendered shadows.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderViewDependentShadowMapForFullZoomedOutView()

void grem::graphics::Renderer3D::renderViewDependentShadowMapForFullZoomedOutView ( Lights3D & lights,
LightID lightID,
const Box< 3, float > & totalShadowCasterBoundingBox,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Unconditionally render the shadow map of a specific shadow mapped view- dependent light source in a set of lights to cover the entire scene at the same quality for all cascade levels.

Parameters
lightsset of lights to render the shadow maps of.
lightIDhandle to the light whose shadow map to render.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
If the given light handle is invalid, not shadow mapped, or has a view-independent shadow map type, this function has no effect.

◆ renderAllViewDependentShadowMapsForFullZoomedOutView()

void grem::graphics::Renderer3D::renderAllViewDependentShadowMapsForFullZoomedOutView ( Lights3D & lights,
const Box< 3, float > & totalShadowCasterBoundingBox,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Unconditionally render the shadow maps of all shadow mapped view- dependent light sources in a set of lights to cover the entire scene at the same quality for all cascade levels.

Parameters
lightsset of lights to render the shadow maps of.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ renderAllShadowMapsForFullZoomedOutView()

void grem::graphics::Renderer3D::renderAllShadowMapsForFullZoomedOutView ( Lights3D & lights,
const Box< 3, float > & totalShadowCasterBoundingBox,
FunctionView< void(RenderPass &, const Camera3D &)> drawShadowCasters )

Unconditionally render the shadow maps of all shadow mapped light sources in a set of lights, such that any view-dependent shadow maps cover the entire scene at the same quality for all cascade levels.

Parameters
lightsset of lights to render the shadow maps of.
totalShadowCasterBoundingBoxaxis-aligned bounding box containing all shadow casters in the scene.
drawShadowCastersfunction that records the draw commands for the shadow casters seen by each light. Should draw only depth from the given camera's perspective onto the given render pass.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

The documentation for this class was generated from the following file: