VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
renderPassDofBlur.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 <vector>
8
10
11namespace visutwin::canvas
12{
14 {
15 public:
16 RenderPassDofBlur(const std::shared_ptr<GraphicsDevice>& device, Texture* nearTexture, Texture* farTexture, Texture* cocTexture);
17
18 float blurRadiusNear = 1.0f;
19 float blurRadiusFar = 1.0f;
20
21 void setBlurRings(int value);
22 int blurRings() const { return _blurRings; }
23
24 void setBlurRingPoints(int value);
25 int blurRingPoints() const { return _blurRingPoints; }
26
27 void execute() override;
28
29 private:
30 void rebuildKernel();
31
32 Texture* _nearTexture = nullptr;
33 Texture* _farTexture = nullptr;
34 Texture* _cocTexture = nullptr;
35 int _blurRings = 3;
36 int _blurRingPoints = 3;
37 std::vector<float> _kernel;
38 };
39}
40
RenderPassDofBlur(const std::shared_ptr< GraphicsDevice > &device, Texture *nearTexture, Texture *farTexture, Texture *cocTexture)
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