aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-07 20:38:14 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-07 20:38:14 -0300
commit8a031dc23331098bb5205414e4eb36aa26a8a123 (patch)
treefceb12bc74d567151cb15da8b51001683dc12976 /src/video_core/buffer_cache
parentd7dc7964f12ffa31a822c702e26bad0c36806f8a (diff)
video_core/texture: Use a LUT to convert sRGB texture borders
This is a reversed look up table extracted from https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62 that is used in https://github.com/devkitPro/deko3d/blob/04d4e9e587fa3dc5447b43d273bc45f440226e41/source/maxwell/tsc_generate.cpp#L38 Games usually bind 0xFD expecting a float texture border of 1.0f. The conversion previous to this commit was multiplying the uint8 sRGB texture border color by 255. This is close to 1.0f but when that difference matters, some graphical glitches appear. This look up table is manually changed in the edges, clamping towards 0.0f and 1.0f. While we are at it, move this logic to its own translation unit.
Diffstat (limited to 'src/video_core/buffer_cache')
0 files changed, 0 insertions, 0 deletions