From e536b02248f370971716b744968776f6880528be Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 22 Dec 2024 17:12:09 +0100 Subject: Renderer: rewrite render scheduling (#8683) This rewrites renderer scheduling. Occlusion is now unified in a new Pass type. --- src/render/pass/BorderPassElement.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/render/pass/BorderPassElement.hpp (limited to 'src/render/pass/BorderPassElement.hpp') diff --git a/src/render/pass/BorderPassElement.hpp b/src/render/pass/BorderPassElement.hpp new file mode 100644 index 00000000..3a529640 --- /dev/null +++ b/src/render/pass/BorderPassElement.hpp @@ -0,0 +1,30 @@ +#pragma once +#include "PassElement.hpp" +#include "../../config/ConfigDataValues.hpp" + +class CGradientValueData; + +class CBorderPassElement : public IPassElement { + public: + struct SBorderData { + CBox box; + CGradientValueData grad1, grad2; + bool hasGrad2 = false; + float lerp = 0.F, a = 1.F; + int round = 0, borderSize = 1, outerRound = -1; + }; + + CBorderPassElement(const SBorderData& data_); + virtual ~CBorderPassElement() = default; + + virtual void draw(const CRegion& damage); + virtual bool needsLiveBlur(); + virtual bool needsPrecomputeBlur(); + + virtual const char* passName() { + return "CBorderPassElement"; + } + + private: + SBorderData data; +}; -- cgit v1.2.3