mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibGL: Fix interpretation of mipmap filtering modes
GL_LINEAR_MIPMAP_NEAREST means choose nearest mipmap level, interpolate texels linearly. GL_NEAREST_MIPMAP_LINEAR means choose the two closest mipmap levels, sample the texels unfiltered and linearly interpolate based on the fractional value of the mipmap level. Previously we had this backwards.
This commit is contained in:
parent
88aa356606
commit
869393c7a0
Notes:
sideshowbarker
2024-07-17 17:59:50 +09:00
Author: https://github.com/sunverwerth
Commit: 869393c7a0
Pull-request: https://github.com/SerenityOS/serenity/pull/12643
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/linusg
1 changed files with 4 additions and 4 deletions
|
@ -2996,13 +2996,13 @@ void SoftwareGLContext::sync_device_sampler_config()
|
|||
config.mipmap_filter = SoftGPU::MipMapFilter::Nearest;
|
||||
break;
|
||||
case GL_LINEAR_MIPMAP_NEAREST:
|
||||
config.texture_min_filter = SoftGPU::TextureFilter::Nearest;
|
||||
config.mipmap_filter = SoftGPU::MipMapFilter::Linear;
|
||||
break;
|
||||
case GL_NEAREST_MIPMAP_LINEAR:
|
||||
config.texture_min_filter = SoftGPU::TextureFilter::Linear;
|
||||
config.mipmap_filter = SoftGPU::MipMapFilter::Nearest;
|
||||
break;
|
||||
case GL_NEAREST_MIPMAP_LINEAR:
|
||||
config.texture_min_filter = SoftGPU::TextureFilter::Nearest;
|
||||
config.mipmap_filter = SoftGPU::MipMapFilter::Linear;
|
||||
break;
|
||||
case GL_LINEAR_MIPMAP_LINEAR:
|
||||
config.texture_min_filter = SoftGPU::TextureFilter::Linear;
|
||||
config.mipmap_filter = SoftGPU::MipMapFilter::Linear;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue