|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
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. | |
Persistent system that provides 3D rendering capabilities.
Default vertex shader for drawing 2D models with a 3D transformation.
Default fragment shader for drawing 2D models with a 3D transformation.
| using grem::graphics::Renderer3D::PBRParameterBuffer = UniformBuffer<PBRParameters, "Renderer3DPBRParameters"> |
Shader buffer for PBR rendering parameters.
| using grem::graphics::Renderer3D::ScreenDecalBuffer = StorageBuffer<ScreenDecalFields, "Renderer3DScreenDecals"> |
Shader buffer for on-screen decals.
| using grem::graphics::Renderer3D::ScreenLightBuffer = StorageBuffer<ScreenLightFields, "Renderer3DScreenLights"> |
Shader buffer for on-screen lights.
| using grem::graphics::Renderer3D::ScreenTileBuffer = UniformBuffer<ScreenTileParameters, "Renderer3DScreenTiles"> |
Shader buffer for screen tiles.
| using grem::graphics::Renderer3D::ScreenDepthBinBuffer = UniformBuffer<ScreenDepthBinParameters, "Renderer3DScreenDepthBins"> |
Shader buffer for screen depth bins.
| using grem::graphics::Renderer3D::ScreenItemBuffer = StorageBuffer<ScreenItemFields, "Renderer3DScreenItems"> |
Shader buffer for screen items.
| using grem::graphics::Renderer3D::ScreenParameterBuffer = UniformBuffer<ScreenParameters, "Renderer3DScreenParameters"> |
Shader buffer for screen parameters.
Set of shader buffers related to the environment.
| using grem::graphics::Renderer3D::ScreenBuffers = BufferSet<ScreenTileBuffer, ScreenDepthBinBuffer, ScreenItemBuffer, ScreenDecalBuffer, ScreenLightBuffer, ScreenParameterBuffer> |
Set of shader buffers related to the screen.
Default vertex shader type for drawing 3D models.
Default fragment shader type for drawing 3D models at full brightness without any lighting.
Default shader pipeline set for drawing 3D models at full brightness without any lighting.
Default fragment shader type for drawing 3D models using PBR.
Default shader pipeline set for drawing 3D models using PBR.
| using grem::graphics::Renderer3D::DefaultSky3DVertexShader = VertexShader<Sky3D::Mesh, Sky3D::VertexShaderConstants, Sky3D::VertexShaderOutputs, Camera3D::ParameterBuffer> |
Default vertex shader for drawing skyboxes.
Default fragment shader for drawing skyboxes without fog.
Default fragment shader for drawing skyboxes using PBR.
| using grem::graphics::Renderer3D::ShadowMapModel3DFragmentShader = Model3D::FragmentShaderBase<Model3D::VertexShaderOutputs, Model3D::FragmentShaderConstants, ShadowMapFragmentShaderOutputs> |
Default fragment shader for drawing 3D models to shadow maps.
Shader pipeline set for drawing 3D models to shadow maps.
Default fragment shader for drawing the distance of 3D models from the camera.
Shader pipeline set for drawing the distance of 3D models from the camera.
| grem::graphics::Renderer3D::Renderer3D | ( | Device & | device, |
| Renderer2D & | renderer2D, | ||
| const Renderer3DOptions & | options = {} ) |
Construct a 3D renderer.
| device | device to create the renderer for. Must outlive the renderer. |
| renderer2D | system providing 2D rendering capabilities. Must outlive the renderer. |
| options | initial configuration of the renderer, see Renderer3DOptions. |
| 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. |
| grem::graphics::Renderer3D::~Renderer3D | ( | ) |
Destructor.
|
delete |
Copying a renderer is not allowed.
|
delete |
Moving a renderer is not allowed.
|
delete |
Copying a renderer is not allowed.
|
delete |
Moving a renderer is not allowed.
|
inline |
Push the draw commands of a frame of 3D instance batches to a render pass, without any environment buffers provided.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| sky | sky of the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| sky | sky of the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| sky | sky of the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| sky | sky of the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
inline |
Push the draw commands of a frame of 3D instance batches to a render pass.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| fog | distance-based fog of the environment. |
| sky | sky of the environment. |
| decals | decals in the environment. |
| lights | direct light sources in the environment. |
| lightProbeVolumes | light probe volumes in the environment. |
| reflectionProbes | reflection probes in the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| fog | distance-based fog of the environment. |
| sky | sky of the environment. |
| decals | decals in the environment. |
| lights | direct light sources in the environment. |
| lightProbeVolumes | light probe volumes in the environment. |
| reflectionProbes | reflection probes in the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
inline |
Push the draw commands of a frame of 3D instance batches to a render pass, without tonemapping when drawing the sky.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| fog | distance-based fog of the environment. |
| sky | sky of the environment. |
| decals | decals in the environment. |
| lights | direct light sources in the environment. |
| lightProbeVolumes | light probe volumes in the environment. |
| reflectionProbes | reflection probes in the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
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.
| renderPass | render pass to push the draw commands to. |
| instanceBatches | read-only views over the instance batches to draw. |
| camera | perspective to render the instances from. |
| fog | distance-based fog of the environment. |
| sky | sky of the environment. |
| decals | decals in the environment. |
| lights | direct light sources in the environment. |
| lightProbeVolumes | light probe volumes in the environment. |
| reflectionProbes | reflection probes in the environment. |
| extraBuffers | extra buffers required by the shaders used in the batch. |
| 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. |
|
inlinenodiscard |
Get the default invisible 2D texture.
|
inlinenodiscard |
Get the default invisible 2D array texture.
|
inlinenodiscard |
Get the default invisible cube texture.
|
inlinenodiscard |
Get the default invisible cube array texture.
|
inlinenodiscard |
Get the default white 2D texture.
|
inlinenodiscard |
Get the default white cubemap texture.
|
inlinenodiscard |
Get the default flat normal map 2D texture.
|
inlinenodiscard |
Get the default 2D depth texture.
|
inlinenodiscard |
Get the default 2D array depth texture.
|
inlinenodiscard |
Get the default cube depth texture.
|
inlinenodiscard |
Get the default cube array depth texture.
|
inlinenodiscard |
Get the default 2D model vertex shader.
|
inlinenodiscard |
Get the default plain 2D model fragment shader.
|
inlinenodiscard |
Get the default plain 2D model shader pipeline.
|
inlinenodiscard |
Get the default text fragment shader.
|
inlinenodiscard |
Get the default text shader pipeline.
|
inlinenodiscard |
Get the default tonemapping fragment shader.
|
inlinenodiscard |
Get the default tonemapping shader pipeline.
|
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):
|
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):
|
inlinenodiscard |
Get the set of 3D model data buffers.
|
inlinenodiscard |
Allocate a range of matrices and upload their values to the 3D model inverse bind-pose matrix buffer.
| inverseBindPoseMatrices | inverse bind-pose matrices to upload. |
| graphics::Error | on failure to upload data. |
| 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. |
|
inlinenoexcept |
Increment the reference count of an allocated range of 3D model inverse bind-pose matrices.
| allocation | the previously allocated range. Must be a valid range that was previously returned from uploadModel3DInverseBindPoseMatrices(). |
|
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.
| allocation | the previously allocated range. Must be a valid range that was previously returned from uploadModel3DInverseBindPoseMatrices(), or an empty range. |
|
inlinenodiscard |
Allocate a range of morph targets and upload their values to the 3D model morph target value buffer.
| morphTargetValues | morph target values to upload. |
| graphics::Error | on failure to upload data. |
| 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. |
|
inlinenoexcept |
Increment the reference count of an allocated range of 3D model morph target values.
| allocation | the previously allocated range. Must be a valid range that was previously returned from uploadModel3DMorphTargetValues(). |
|
inlinenoexcept |
Decrement the reference count of an allocated range of 3D model morph target values, and deallocate the range if the count reaches 0.
| allocation | the previously allocated range. Must be a valid range that was previously returned from uploadModel3DMorphTargetValues(), or an empty range. |
|
nodiscard |
Get the default 2D-model-in-3D vertex shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default plain 2D-model-in-3D fragment shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default plain 2D-model-in-3D shader pipeline.
| graphics::Error | on failure to create the pipeline if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default plain 3D text fragment shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default plain 3D text shader pipeline.
| graphics::Error | on failure to create the pipeline if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default 3D model vertex shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default unlit 3D model fragment shader, which renders models' base color at full brightness without any lighting.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default unlit 3D model shader pipeline set, which renders models' base color at full brightness without any lighting.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
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.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
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.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
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.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default PBR 3D model fragment shader, which renders models using physically based rendering principles given the lighting from the environment.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
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.
|
inlinenodiscard |
Get the default PBR 3D model shader pipeline set, which renders models using physically based rendering principles given the lighting from the environment.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
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.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default shadow map 3D model shader pipeline set, which renders models to the depth buffer, without outputting any color.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
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.
| graphics::Error | on failure to create the pipeline set if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default skybox vertex shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default unlit skybox fragment shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default unlit skybox shader pipeline.
| graphics::Error | on failure to create the pipeline if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default non-tonemapped unlit skybox shader pipeline.
| graphics::Error | on failure to create the pipeline if it doesn't already exist. |
| 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. |
|
nodiscard |
Get the default PBR skybox fragment shader.
| graphics::Error | on failure to create the shader if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default PBR skybox shader pipeline.
| graphics::Error | on failure to create the pipeline if it doesn't already exist. |
| 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. |
|
inlinenodiscard |
Get the default non-tonemapped PBR skybox shader pipeline.
| graphics::Error | on failure to create the pipeline if it doesn't already exist. |
| 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. |
|
inlinenodiscardnoexcept |
Get the default 3D cube model.
|
inlinenodiscardnoexcept |
Get the default 3D cubemap.
|
inlinenodiscard |
Get the default BRDF integration map for split-sum approximation of ambient specular reflections.
| graphics::Error | on failure to create the texture if it doesn't already exist. |
| 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. |
| 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.
| lights | set of lights containing the light to render the shadow map of. |
| lightID | handle to the light whose shadow map to render. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerProjectionMatrix | projection matrix of the camera that will later be observing the rendered shadows. |
| observerViewMatrix | view matrix of the camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
|
inline |
Render the shadow map of a specific shadow mapped light source in a set of lights with respect to a future observer.
| lights | set of lights containing the light to render the shadow map of. |
| lightID | handle to the light whose shadow map to render. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerCamera | camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights to render the shadow maps of. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerProjectionMatrix | projection matrix of the camera that will later be observing the rendered shadows. |
| observerViewMatrix | view matrix of the camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
|
inline |
Render the shadow maps of shadow mapped light sources in a set of lights with respect to a future observer.
| lights | set of lights to render the shadow maps of. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerCamera | camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights containing the light to render the shadow map of. |
| lightID | handle to the light whose shadow map to render. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights to render the view-independent shadow maps of. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights containing the light to render the shadow map of. |
| lightID | handle to the light whose shadow map to render. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerProjectionMatrix | projection matrix of the camera that will later be observing the rendered shadows. |
| observerViewMatrix | view matrix of the camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
|
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.
| lights | set of lights containing the light to render the shadow map of. |
| lightID | handle to the light whose shadow map to render. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerCamera | camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights to render the cascaded shadow maps of. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerProjectionMatrix | projection matrix of the camera that will later be observing the rendered shadows. |
| observerViewMatrix | view matrix of the camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
|
inline |
Render the shadow maps of shadow mapped view-dependent light sources in a set of lights with respect to a future observer.
| lights | set of lights to render the view-dependent shadow maps of. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| observerCamera | camera that will later be observing the rendered shadows. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights to render the shadow maps of. |
| lightID | handle to the light whose shadow map to render. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights to render the shadow maps of. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| drawShadowCasters | function 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. |
| 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. |
| 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.
| lights | set of lights to render the shadow maps of. |
| totalShadowCasterBoundingBox | axis-aligned bounding box containing all shadow casters in the scene. |
| drawShadowCasters | function 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. |
| 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. |