1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

LibSoftGPU: Vectorize texture sampling and shading

This commit is contained in:
Stephan Unverwerth 2022-01-06 17:06:46 +01:00 committed by Ali Mohammad Pur
parent 444a15bad3
commit 034dc480d2
4 changed files with 173 additions and 94 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/RefPtr.h>
#include <AK/SIMD.h>
#include <LibGfx/Vector2.h>
#include <LibGfx/Vector4.h>
#include <LibSoftGPU/Image.h>
@ -52,7 +53,7 @@ struct SamplerConfig final {
class Sampler final {
public:
FloatVector4 sample_2d(FloatVector2 const& uv) const;
Vector4<AK::SIMD::f32x4> sample_2d(Vector2<AK::SIMD::f32x4> const& uv) const;
void set_config(SamplerConfig const& config) { m_config = config; }
SamplerConfig const& config() const { return m_config; }