Skip to content

Commit

Permalink
Increase LOD bias for mipmapping
Browse files Browse the repository at this point in the history
Mipmapping caused too much blurring.

Using a LOD bias of -1 instead of -0.5 seems a better compromise to
avoid low-quality downscaling while keeping sharp edges in any case.

Refs <#1394>
Refs <#40 (comment)>
  • Loading branch information
rom1v committed May 23, 2020
1 parent fae3f9e commit ac4c8b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ create_texture(struct screen *screen) {
// Enable trilinear filtering for downscaling
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR_MIPMAP_LINEAR);
gl->TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, -.5f);
gl->TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, -1.f);

SDL_GL_UnbindTexture(texture);
}
Expand Down

0 comments on commit ac4c8b4

Please sign in to comment.