VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
renderPassPrepass.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4//
5#include "renderPassPrepass.h"
6
8
9namespace visutwin::canvas
10{
11 RenderPassPrepass::RenderPassPrepass(const std::shared_ptr<GraphicsDevice>& device, Scene* scene, Renderer* renderer,
12 CameraComponent* cameraComponent, Texture* sceneDepthTexture, const std::shared_ptr<RenderPassOptions>& options)
13 : RenderPass(device), _scene(scene), _renderer(renderer), _cameraComponent(cameraComponent),
14 _sceneDepthTexture(sceneDepthTexture)
15 {
16 // DEVIATION: renderer prepass shader pass is not fully ported; keep a lightweight pass node for parity.
17 (void)_scene;
18 (void)_renderer;
19 (void)_cameraComponent;
20 setOptions(options);
21 }
22
24 {
25 // DEVIATION: full SHADER_PREPASS mesh submission path is pending renderer shader-pass parity.
26 }
27
29 {
31 if (const auto gd = device(); gd && _sceneDepthTexture) {
32 gd->setSceneDepthMap(_sceneDepthTexture);
33 }
34 }
35}
36
std::shared_ptr< GraphicsDevice > device() const
Definition renderPass.h:124
RenderPass(const std::shared_ptr< GraphicsDevice > &device)
Definition renderPass.h:66
void setOptions(const std::shared_ptr< RenderPassOptions > &value)
RenderPassPrepass(const std::shared_ptr< GraphicsDevice > &device, Scene *scene, Renderer *renderer, CameraComponent *cameraComponent, Texture *sceneDepthTexture, const std::shared_ptr< RenderPassOptions > &options)
Container for the scene graph, lighting environment, fog, skybox, and layer composition.
Definition scene.h:29
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.
Definition texture.h:57