mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
LibSoftGPU: Add legacy texture env mode to sampler config
This commit is contained in:
parent
b41ad28654
commit
908a6339ec
1 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,12 @@ enum class TextureWrapMode {
|
|||
ClampToEdge,
|
||||
};
|
||||
|
||||
enum class TextureEnvMode {
|
||||
Modulate,
|
||||
Replace,
|
||||
Decal,
|
||||
};
|
||||
|
||||
struct SamplerConfig final {
|
||||
RefPtr<Image> bound_image;
|
||||
MipMapFilter mipmap_filter { MipMapFilter::Nearest };
|
||||
|
@ -41,6 +47,7 @@ struct SamplerConfig final {
|
|||
TextureWrapMode texture_wrap_v { TextureWrapMode::Repeat };
|
||||
TextureWrapMode texture_wrap_w { TextureWrapMode::Repeat };
|
||||
FloatVector4 border_color { 0, 0, 0, 1 };
|
||||
TextureEnvMode fixed_function_texture_env_mode { TextureEnvMode::Modulate };
|
||||
};
|
||||
|
||||
class Sampler final {
|
||||
|
@ -48,6 +55,7 @@ public:
|
|||
FloatVector4 sample_2d(FloatVector2 const& uv) const;
|
||||
|
||||
void set_config(SamplerConfig const& config) { m_config = config; }
|
||||
SamplerConfig const& config() const { return m_config; }
|
||||
|
||||
private:
|
||||
SamplerConfig m_config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue