VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
renderPassDownsample.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
8
9namespace visutwin::canvas
10{
12 {
13 public:
14 struct Options
15 {
16 bool boxFilter = false;
19 bool removeInvalid = false;
20 };
21
22 RenderPassDownsample(const std::shared_ptr<GraphicsDevice>& device, Texture* sourceTexture);
23 RenderPassDownsample(const std::shared_ptr<GraphicsDevice>& device, Texture* sourceTexture,
24 const Options& options);
25
26 void setSourceTexture(Texture* value);
27 void execute() override;
28
29 private:
30 Texture* _sourceTexture = nullptr;
31 Texture* _premultiplyTexture = nullptr;
32 Options _options;
33 float _sourceInvResolution[2] = {1.0f, 1.0f};
34 };
35}
RenderPassDownsample(const std::shared_ptr< GraphicsDevice > &device, Texture *sourceTexture)
std::shared_ptr< GraphicsDevice > device() const
Definition renderPass.h:124
RenderPassShaderQuad(const std::shared_ptr< GraphicsDevice > &device)
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.
Definition texture.h:57