Renderer: rewrite render scheduling (#8683)
This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
This commit is contained in:
parent
1cc1a46c2e
commit
e536b02248
42 changed files with 1576 additions and 775 deletions
39
src/render/pass/TexPassElement.hpp
Normal file
39
src/render/pass/TexPassElement.hpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
#include "PassElement.hpp"
|
||||
#include <optional>
|
||||
|
||||
class CWLSurfaceResource;
|
||||
class CTexture;
|
||||
class CSyncTimeline;
|
||||
|
||||
class CTexPassElement : public IPassElement {
|
||||
public:
|
||||
struct SRenderData {
|
||||
SP<CTexture> tex;
|
||||
CBox box;
|
||||
float a = 1.F;
|
||||
CRegion damage;
|
||||
int round = 0;
|
||||
bool flipEndFrame = false;
|
||||
SP<CSyncTimeline> syncTimeline;
|
||||
int64_t syncPoint = 0;
|
||||
std::optional<Mat3x3> replaceProjection;
|
||||
};
|
||||
|
||||
CTexPassElement(const SRenderData& data);
|
||||
virtual ~CTexPassElement() = default;
|
||||
|
||||
virtual void draw(const CRegion& damage);
|
||||
virtual bool needsLiveBlur();
|
||||
virtual bool needsPrecomputeBlur();
|
||||
virtual std::optional<CBox> boundingBox();
|
||||
virtual CRegion opaqueRegion();
|
||||
virtual void discard();
|
||||
|
||||
virtual const char* passName() {
|
||||
return "CTexPassElement";
|
||||
}
|
||||
|
||||
private:
|
||||
SRenderData data;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue