mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:38:13 +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
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