|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <VoxelGI.hpp>
Public Member Functions | |
| VoxelGI (GfxDevice &device, RenderContext &context) | |
| ~VoxelGI () | |
| VoxelGI (const VoxelGI &)=delete | |
| VoxelGI & | operator= (const VoxelGI &)=delete |
| rg::ResourceId | declare (rg::RenderGraph &graph, rg::ResourceId input, rg::ResourceId scene, const VoxelGIParams ¶ms, u32 width, u32 height, TextureHandle shadowAtlas=TextureHandle::Invalid, rg::ResourceId shadowResource=rg::kNoResource) |
Declares the four passes onto graph, reading input and the scene's depth and G-buffer. | |
| void | release () |
Static Public Member Functions | |
| static u32 | gridSizeOf (u32 asked) |
| static u32 | sunSamplesOf (u32 asked) |
Static Public Attributes | |
| static constexpr u32 | kMaxGridSize = 128 |
| static constexpr u32 | kMinGridSize = 32 |
Definition at line 70 of file VoxelGI.hpp.
| esengine::VoxelGI::VoxelGI | ( | GfxDevice & | device, |
| RenderContext & | context ) |
Definition at line 487 of file VoxelGI.cpp.
Referenced by VoxelGI(), and operator=().
| esengine::VoxelGI::~VoxelGI | ( | ) |
Definition at line 489 of file VoxelGI.cpp.
References release().
|
delete |
References VoxelGI().
| rg::ResourceId esengine::VoxelGI::declare | ( | rg::RenderGraph & | graph, |
| rg::ResourceId | input, | ||
| rg::ResourceId | scene, | ||
| const VoxelGIParams & | params, | ||
| u32 | width, | ||
| u32 | height, | ||
| TextureHandle | shadowAtlas = TextureHandle::Invalid, | ||
| rg::ResourceId | shadowResource = rg::kNoResource ) |
Declares the four passes onto graph, reading input and the scene's depth and G-buffer.
| scene | The scene's resource, kept alive through the passes (they read its depth and G-buffer). |
input with the gathered light added; input itself when there is nothing to do. Definition at line 666 of file VoxelGI.cpp.
References esengine::rg::RenderGraph::addPass(), esengine::rg::RenderGraph::albedoTextureOf(), esengine::rg::PassDesc::compute, esengine::rg::RenderGraph::createTarget(), esengine::ctx(), esengine::rg::PassDesc::dependencies, esengine::GfxComputeBinding::depth(), esengine::rg::RenderGraph::depthTextureOf(), esengine::VoxelGIParams::divisor, esengine::rg::PassDesc::execute, esengine::rg::TargetDesc::format, esengine::rg::RenderGraph::gbufferTextureOf(), esengine::VoxelGIParams::gridSize, gridSizeOf(), esengine::rg::TargetDesc::height, esengine::Invalid, esengine::rg::kNoResource, esengine::rg::TargetDesc::linearFilter, esengine::rg::PassDesc::name, esengine::rg::PassDesc::reads, esengine::RGBA16F, esengine::RGBA8, esengine::GfxComputeBinding::sampled(), esengine::GfxComputeBinding::storage(), esengine::rg::TargetDesc::storage, esengine::GfxComputeBinding::storageRead(), esengine::GfxComputeBinding::storageTexture(), esengine::VoxelGIParams::sunAlbedo, esengine::VoxelGIParams::sunSamples, sunSamplesOf(), esengine::GfxComputeBinding::uniform(), esengine::rg::TargetDesc::width, and esengine::rg::PassDesc::write.
Definition at line 511 of file VoxelGI.cpp.
References kMaxGridSize, and kMinGridSize.
Referenced by declare().
References VoxelGI(), esengine::Invalid, and esengine::rg::kNoResource.
| void esengine::VoxelGI::release | ( | ) |
Frees the device objects (the grid, the programs).
Definition at line 493 of file VoxelGI.cpp.
References esengine::Invalid.
Referenced by ~VoxelGI().
Definition at line 517 of file VoxelGI.cpp.
Referenced by declare().
|
staticconstexpr |
Definition at line 90 of file VoxelGI.hpp.
Referenced by gridSizeOf().
|
staticconstexpr |
Definition at line 91 of file VoxelGI.hpp.
Referenced by gridSizeOf().