13 GeometryResult CoverGeometry::GetPositionBuffer(
const ContentContext& renderer,
15 RenderPass& pass)
const {
17 constexpr uint16_t kRectIndicies[4] = {0, 1, 2, 3};
18 auto& host_buffer = renderer.GetTransientsBuffer();
19 return GeometryResult{
23 .vertex_buffer = host_buffer.Emplace(
24 rect.GetTransformedPoints(entity.GetTransform().Invert())
26 8 *
sizeof(
float),
alignof(
float)),
27 .index_buffer = host_buffer.Emplace(
28 kRectIndicies, 4 *
sizeof(uint16_t),
alignof(uint16_t)),
32 .transform = entity.GetShaderTransform(pass),
36 std::optional<Rect> CoverGeometry::GetCoverage(
const Matrix&
transform)
const {
41 const Rect& rect)
const {
bool CanApplyMaskFilter() const override
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
A 4x4 matrix using column-major storage.
constexpr static TRect MakeSize(const TSize< U > &size)
constexpr static TRect MakeMaximum()