VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
renderPassTAA.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4//
5#pragma once
6
7#include <array>
8
10
11namespace visutwin::canvas
12{
13 class CameraComponent;
14
16 {
17 public:
18 RenderPassTAA(const std::shared_ptr<GraphicsDevice>& device, Texture* sourceTexture, CameraComponent* cameraComponent);
19
20 void before() override;
21 void execute() override;
22 void frameUpdate() const override;
23
24 std::shared_ptr<Texture> update();
25 std::shared_ptr<Texture> historyTexture() const { return _historyTexture; }
26 bool historyValid() const { return _historyValid; }
27 void setSourceTexture(Texture* sourceTexture) { _sourceTexture = sourceTexture; }
28 void setDepthTexture(Texture* depthTexture) { _depthTexture = depthTexture; }
29 void setHighQuality(const bool value) { _highQuality = value; }
30
31 private:
32 void setup();
33
34 int _historyIndex = 0;
35 Texture* _sourceTexture = nullptr;
36 Texture* _depthTexture = nullptr;
37 CameraComponent* _cameraComponent = nullptr;
38 bool _highQuality = true;
39 bool _historyValid = false;
40
41 std::array<std::shared_ptr<Texture>, 2> _historyTextures{};
42 std::array<std::shared_ptr<RenderTarget>, 2> _historyRenderTargets{};
43 std::shared_ptr<Texture> _historyTexture;
44 };
45}
std::shared_ptr< GraphicsDevice > device() const
Definition renderPass.h:124
RenderPassShaderQuad(const std::shared_ptr< GraphicsDevice > &device)
void setHighQuality(const bool value)
void frameUpdate() const override
RenderPassTAA(const std::shared_ptr< GraphicsDevice > &device, Texture *sourceTexture, CameraComponent *cameraComponent)
void setSourceTexture(Texture *sourceTexture)
void setDepthTexture(Texture *depthTexture)
std::shared_ptr< Texture > update()
std::shared_ptr< Texture > historyTexture() const
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.
Definition texture.h:57