diff --git a/impeller/entity/contents/filters/inputs/texture_filter_input.cc b/impeller/entity/contents/filters/inputs/texture_filter_input.cc index 09a393bc51e07..b64a78a34912d 100644 --- a/impeller/entity/contents/filters/inputs/texture_filter_input.cc +++ b/impeller/entity/contents/filters/inputs/texture_filter_input.cc @@ -6,6 +6,8 @@ #include +#include "impeller/renderer/formats.h" + namespace impeller { TextureFilterInput::TextureFilterInput(std::shared_ptr texture, @@ -21,7 +23,13 @@ FilterInput::Variant TextureFilterInput::GetInput() const { std::optional TextureFilterInput::GetSnapshot( const ContentContext& renderer, const Entity& entity) const { - return Snapshot{.texture = texture_, .transform = GetTransform(entity)}; + auto snapshot = + Snapshot{.texture = texture_, .transform = GetTransform(entity)}; + if (texture_->GetMipCount() > 1) { + snapshot.sampler_descriptor.label = "TextureFilterInput Trilinear Sampler"; + snapshot.sampler_descriptor.mip_filter = MipFilter::kLinear; + } + return snapshot; } std::optional TextureFilterInput::GetCoverage( diff --git a/impeller/renderer/snapshot.h b/impeller/renderer/snapshot.h index 41ad4071445b7..48204473595eb 100644 --- a/impeller/renderer/snapshot.h +++ b/impeller/renderer/snapshot.h @@ -30,7 +30,7 @@ struct Snapshot { SamplerDescriptor("Default Snapshot Sampler", MinMagFilter::kLinear, MinMagFilter::kLinear, - MipFilter::kLinear); + MipFilter::kNone); Scalar opacity = 1.0f;