![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <voxelization_pass.hpp>
Public Member Functions | |
VoxelizationPass (ID3D11Device &device, ID3D11DeviceContext &device_context, StateManager &state_manager, ResourceManager &resource_manager) | |
VoxelizationPass (const VoxelizationPass &pass)=delete | |
VoxelizationPass (VoxelizationPass &&pass) noexcept | |
~VoxelizationPass () | |
VoxelizationPass & | operator= (const VoxelizationPass &pass)=delete |
VoxelizationPass & | operator= (VoxelizationPass &&pass) noexcept |
void XM_CALLCONV | Render (const World &world, FXMMATRIX world_to_projection, std::size_t resolution) |
Private Member Functions | |
void | SetupRasterizerState (ID3D11Device &device) |
void | SetupVoxelGrid (std::size_t resolution) |
void | BindFixedState () const noexcept |
void XM_CALLCONV | Render (const World &world, FXMMATRIX world_to_projection) const |
void XM_CALLCONV | Render (const Model &model, FXMMATRIX world_to_projection) const noexcept |
void | Dispatch () const noexcept |
Private Attributes | |
std::reference_wrapper< ID3D11DeviceContext > | m_device_context |
std::reference_wrapper< StateManager > | m_state_manager |
std::reference_wrapper< ResourceManager > | m_resource_manager |
ComPtr< ID3D11RasterizerState2 > | m_rs |
VertexShaderPtr | m_vs |
GeometryShaderPtr | m_gs |
ComputeShaderPtr | m_cs |
UniquePtr< VoxelGrid > | m_voxel_grid |
A class of voxelization passes for rendering models using a variable (material dependent) shading.
|
explicit |
Constructs a voxelization pass.
[in,out] | device | A reference to the device. |
[in,out] | device_context | A reference to the device context. |
[in,out] | state_manager | A reference to the state manager. |
[in,out] | resource_manager | A reference to the resource manager. |
|
delete |
Constructs a voxelization pass from the given voxelization pass.
[in] | pass | A reference to the voxelization pass to copy. |
|
defaultnoexcept |
Constructs a voxelization pass by moving the given variable shading pass.
[in] | pass | A reference to the voxelization pass to move. |
|
default |
Destructs this voxelization pass.
|
privatenoexcept |
Binds the fixed state of this voxelization pass.
|
privatenoexcept |
Dispatches this voxelization pass.
|
delete |
Copies the given voxelization pass to this voxelization pass.
[in] | pass | A reference to the voxelization pass to copy. |
|
defaultnoexcept |
Moves the given voxelization pass to this voxelization pass.
[in] | pass | A reference to the voxelization pass to move. |
void XM_CALLCONV mage::rendering::VoxelizationPass::Render | ( | const World & | world, |
FXMMATRIX | world_to_projection, | ||
std::size_t | resolution | ||
) |
Renders the world.
[in] | world | A reference to the world. |
[in] | world_to_projection | The world-to-projection transformation matrix. |
[in] | resolution | The resolution of the regular voxel grid. |
Exception | Failed to render the world. |
|
private |
Renders the given world.
[in] | world | A reference to the world. |
[in] | world_to_projection | The world-to-projection transformation matrix. |
Exception | Failed to render the world. |
|
privatenoexcept |
Renders the given model.
[in] | model | A reference to the model. |
[in] | world_to_projection | The world-to-projection transformation matrix. |
|
private |
|
private |
Sets up the voxel grid of this voxelization pass.
[in] | resolution | The resolution of the regular voxel grid. |
Exception | Failed to render the world. |
|
private |
A pointer to the compute shader of this voxelization pass.
|
private |
A reference to the device context of this voxelization pass.
|
private |
A pointer to the geometry shader of this voxelization pass.
|
private |
A reference to the resource manager of this voxelization pass.
|
private |
A pointer to the rasterizer state of this voxelization pass.
|
private |
A reference to the state manager of this voxelization pass.
The voxel grid of this voxelization pass.
|
private |
A pointer to the vertex shader of this voxelization pass.