#include <GBuffer.hpp>
◆ GBuffer()
| DefaultPipeline::Resource::GBuffer::GBuffer |
( |
std::string_view | name = GBUFFER_PASS_NAME | ) |
|
|
inlineexplicit |
Constructs a GBuffer render pass with an optional name.
- Parameters
-
| name | Human-readable name for the render pass; defaults to GBUFFER_PASS_NAME. |
◆ CreateShader()
Constructs and returns a shader configured for the G-buffer pass.
The shader includes vertex and fragment entry points ("vs_main", "fs_main"), bind-group layouts for camera, model, and material, a vertex buffer layout with position/normal/uv attributes, two color outputs (normal as RGBA16Float and albedo as BGRA8Unorm), and a depth output (Depth32Float).
- Parameters
-
| graphicContext | Graphics resource context used to create the shader. |
- Returns
- Graphic::Resource::Shader A shader instance configured for the G-buffer rendering pass.
◆ UniqueRenderCallback()
| void DefaultPipeline::Resource::GBuffer::UniqueRenderCallback |
( |
wgpu::RenderPassEncoder & | renderPass, |
|
|
Engine::Core & | core ) |
|
inlineoverridevirtual |
Render all entities with GPUTransform and GPUMesh into the G-buffer using the active camera.
Binds the first available camera's bind group, then for each entity with GPUTransform and GPUMesh: binds the entity's transform and material bind groups (falls back to the default material if none), binds the vertex and index buffers, and issues an indexed draw call to populate the G-buffer outputs.
If no entity exposes a GPUCamera component, logs an error and returns without drawing.
- Parameters
-
| renderPass | The render pass encoder used to record bind-group bindings, buffer bindings, and draw commands. |
| core | Engine core providing access to resources and the entity registry. |
Implements Graphic::Resource::ASingleExecutionRenderPass< GBuffer >.
The documentation for this class was generated from the following file:
- src/plugin/default-pipeline/src/resource/pass/GBuffer.hpp