flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.45k stars 174 forks source link

Bilinear / Bicubic Texture Filtering #506

Closed Papermanzero closed 2 years ago

Papermanzero commented 2 years ago

Describe the solution you'd like A clear and concise description of what you want to happen.

Currently the dreamcast supports texture filtering only as XBR or unfiltered. It would be great to have bilinear and bicubic filtering as well. In come cases the XBR filtering looks not very matching to the style of the game. Therefore bilinear/bicubic would much more fit

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

An option to filter all textures or just the dreamcast foreseen textures together with an option about the filtering (unfiltered, xbr, bilinear, bicubic)

shinslash commented 2 years ago

Really want that

Calinou commented 2 years ago

Bilinear texture filtering is already available in Flycast – it's the default if the game does not request nearest-neighbor filtering. However, https://github.com/flyinghead/flycast/pull/574 makes it possible to force bilinear filtering on all textures if you wish. It also exposes the anisotropic filtering option to the GUI, which improves texture appearance when viewed at oblique angles.

Bicubic texture filtering (or even 3-point texture filtering) could be implemented similar to xBRZ, but I'm not sure if it's worth the effort. Bicubic usually ends up looking very blurry for low-resolution textures. In fact, 3-point filtering may be a worthwhile alternative if you want a middleground between nearest-neighbor and linear filtering.

Papermanzero commented 2 years ago

Actually I thought that Bicubic has a crispier look than bilinear because the transition from one color to another is not so broad. Means the sharpness is more given than with bilinear. However the calculation is more intensive than bilinear

Here an example:

flyinghead commented 2 years ago

Bilinear and point sampling can now be forced (#574). Bicubic filtering isn't worth the effort IMHO.