diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-07 20:38:14 -0300 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-07 20:38:14 -0300 |
commit | d7db0881808376864eb71eb5dde8b651a5cf891d (patch) | |
tree | fceb12bc74d567151cb15da8b51001683dc12976 /src/common/string_util.cpp | |
parent | 27f122c48c2f12d53e13349b61e4c52fc9cb8b9b (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/common/string_util.cpp')
0 files changed, 0 insertions, 0 deletions