|
candlewick 0.10.0-4-g76c0
A tiny cross-platform renderer based on SDL3
|
Class for defining the shadow maps (as an atlas) and rendering into it. More...
#include <candlewick/core/DepthAndShadowPass.h>
Classes | |
| struct | AtlasRegion |
| Texture atlas region, implicitly converts to an SDLGPU viewport. More... | |
Public Types | |
| using | Config = ShadowPassConfig |
Public Member Functions | |
| ShadowMapPass (NoInitT) | |
| ShadowMapPass (const Device &device, const MeshLayout &layout, SDL_GPUTextureFormat format, const Config &config) | |
| ShadowMapPass (const Device &device, const MeshLayout &layout, SDL_GPUTextureFormat format) | |
| ShadowMapPass (const ShadowMapPass &)=delete | |
| ShadowMapPass & | operator= (const ShadowMapPass &)=delete |
| ShadowMapPass (ShadowMapPass &&other) noexcept | |
| ShadowMapPass & | operator= (ShadowMapPass &&other) noexcept |
| bool | initialized () const |
| void | render (CommandBuffer &cmdBuf, std::span< const OpaqueCastable > castables) |
| void | release () noexcept |
| ~ShadowMapPass () noexcept | |
| auto | numLights () const noexcept |
Public Attributes | |
| Texture | shadowMap {NoInit} |
| actually a texture atlas | |
| GraphicsPipeline | pipeline {NoInit} |
| SDL_GPUSampler * | sampler = nullptr |
| std::array< Camera, kNumLights > | cam |
| std::array< AtlasRegion, kNumLights > | regions |
| regions of the atlas | |
Class for defining the shadow maps (as an atlas) and rendering into it.
The user has to take care of setting the "cameras" corresponding to the actual lights.
|
inline |
| candlewick::ShadowMapPass::ShadowMapPass | ( | const Device & | device, |
| const MeshLayout & | layout, | ||
| SDL_GPUTextureFormat | format, | ||
| const Config & | config ) |
|
inline |
|
delete |
|
noexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
delete |
|
noexcept |
|
noexcept |
| void candlewick::ShadowMapPass::render | ( | CommandBuffer & | cmdBuf, |
| std::span< const OpaqueCastable > | castables ) |
| std::array<Camera, kNumLights> candlewick::ShadowMapPass::cam |
| GraphicsPipeline candlewick::ShadowMapPass::pipeline {NoInit} |
| std::array<AtlasRegion, kNumLights> candlewick::ShadowMapPass::regions |
regions of the atlas
| SDL_GPUSampler* candlewick::ShadowMapPass::sampler = nullptr |