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:
parent
444a15bad3
commit
034dc480d2
4 changed files with 173 additions and 94 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue