candlewick 0.6.0
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 |
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 | |
SDL_GPUGraphicsPipeline * | pipeline = nullptr |
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 |
|
inlinenoexcept |
|
delete |
|
noexcept |
|
noexcept |
void candlewick::ShadowMapPass::render | ( | CommandBuffer & | cmdBuf, |
std::span< const OpaqueCastable > | castables ) |
std::array<Camera, kNumLights> candlewick::ShadowMapPass::cam |
SDL_GPUGraphicsPipeline* candlewick::ShadowMapPass::pipeline = nullptr |
std::array<AtlasRegion, kNumLights> candlewick::ShadowMapPass::regions |
regions of the atlas
SDL_GPUSampler* candlewick::ShadowMapPass::sampler = nullptr |