mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +00:00
LibGL: Implement GL_TEXTURE_LOD_BIAS
for texture objects
This commit is contained in:
parent
59fc2a4aad
commit
eda1ffba73
Notes:
sideshowbarker
2024-07-17 07:20:57 +09:00
Author: https://github.com/gmta
Commit: eda1ffba73
Pull-request: https://github.com/SerenityOS/serenity/pull/15227
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/Smrtnyk ✅
Reviewed-by: https://github.com/sunverwerth ✅
3 changed files with 10 additions and 2 deletions
|
@ -134,7 +134,6 @@ Vector4<AK::SIMD::f32x4> Sampler::sample_2d(Vector2<AK::SIMD::f32x4> const& uv)
|
|||
if (m_config.mipmap_filter == GPU::MipMapFilter::None)
|
||||
return sample_2d_lod(uv, expand4(base_level), m_config.texture_min_filter);
|
||||
|
||||
// FIXME: add texture-level support for GL_TEXTURE_LOD_BIAS; below is only texture unit-level
|
||||
auto texture_lod_bias = AK::clamp(m_config.level_of_detail_bias, -MAX_TEXTURE_LOD_BIAS, MAX_TEXTURE_LOD_BIAS);
|
||||
// FIXME: Instead of clamping to num_levels - 1, actually make the max mipmap level configurable with glTexParameteri(GL_TEXTURE_MAX_LEVEL, max_level)
|
||||
auto min_level = expand4(static_cast<float>(base_level));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue