mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibGL+LibGPU+LibSoftGPU: Move SamplerConfig to LibGPU
This commit is contained in:
parent
54307a9cd3
commit
e7450fa940
6 changed files with 103 additions and 87 deletions
|
@ -977,13 +977,13 @@ ALWAYS_INLINE void Device::shade_fragments(PixelQuad& quad)
|
|||
|
||||
// FIXME: Implement more blend modes
|
||||
switch (sampler.config().fixed_function_texture_env_mode) {
|
||||
case SoftGPU::TextureEnvMode::Modulate:
|
||||
case GPU::TextureEnvMode::Modulate:
|
||||
quad.out_color = quad.out_color * texel;
|
||||
break;
|
||||
case SoftGPU::TextureEnvMode::Replace:
|
||||
case GPU::TextureEnvMode::Replace:
|
||||
quad.out_color = texel;
|
||||
break;
|
||||
case SoftGPU::TextureEnvMode::Decal: {
|
||||
case GPU::TextureEnvMode::Decal: {
|
||||
auto dst_alpha = texel.w();
|
||||
quad.out_color.set_x(mix(quad.out_color.x(), texel.x(), dst_alpha));
|
||||
quad.out_color.set_y(mix(quad.out_color.y(), texel.y(), dst_alpha));
|
||||
|
@ -1231,7 +1231,7 @@ NonnullRefPtr<Image> Device::create_image(GPU::ImageFormat format, unsigned widt
|
|||
return adopt_ref(*new Image(width, height, depth, levels, layers));
|
||||
}
|
||||
|
||||
void Device::set_sampler_config(unsigned sampler, SamplerConfig const& config)
|
||||
void Device::set_sampler_config(unsigned sampler, GPU::SamplerConfig const& config)
|
||||
{
|
||||
m_samplers[sampler].set_config(config);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue