13 TextureFilterInput::TextureFilterInput(std::shared_ptr<Texture> texture,
14 Matrix local_transform)
15 : texture_(
std::move(texture)), local_transform_(local_transform) {}
17 TextureFilterInput::~TextureFilterInput() =
default;
19 std::optional<Snapshot> TextureFilterInput::GetSnapshot(
20 std::string_view label,
23 std::optional<Rect> coverage_limit,
24 int32_t mip_count)
const {
27 if (texture_->GetMipCount() > 1) {
28 snapshot.sampler_descriptor.label =
"TextureFilterInput Trilinear Sampler";
29 snapshot.sampler_descriptor.mip_filter = MipFilter::kLinear;
34 std::optional<Rect> TextureFilterInput::GetCoverage(
35 const Entity& entity)
const {
36 return Rect::MakeSize(texture_->GetSize())
37 .TransformBounds(GetTransform(entity));
40 Matrix TextureFilterInput::GetLocalTransform(
const Entity& entity)
const {
41 return local_transform_;
A 4x4 matrix using column-major storage.
Represents a texture and its intended draw transform/sampler configuration.
std::shared_ptr< Texture > texture