/* * Copyright (c) 2021, Stephan Unverwerth * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace SoftGPU { class Sampler final { public: Vector4 sample_2d(Vector2 const& uv) const; void set_config(GPU::SamplerConfig const& config) { m_config = config; } GPU::SamplerConfig const& config() const { return m_config; } private: Vector4 sample_2d_lod(Vector2 const& uv, AK::SIMD::u32x4 level, GPU::TextureFilter) const; GPU::SamplerConfig m_config; }; }