mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-23 22:55:26 +00:00
Make byteround less expensive (thanks hrydgard!)
This commit is contained in:
parent
734279ff22
commit
234161ba62
|
@ -1101,19 +1101,19 @@ float LookupLightingLUTSigned(int lut_index, float pos) {
|
|||
}
|
||||
|
||||
float byteround(float x) {
|
||||
return round(x * 255.0) / 255.0;
|
||||
return round(x * 255.0) * (1.0 / 255.0);
|
||||
}
|
||||
|
||||
vec2 byteround(vec2 x) {
|
||||
return round(x * 255.0) / 255.0;
|
||||
return round(x * 255.0) * (1.0 / 255.0);
|
||||
}
|
||||
|
||||
vec3 byteround(vec3 x) {
|
||||
return round(x * 255.0) / 255.0;
|
||||
return round(x * 255.0) * (1.0 / 255.0);
|
||||
}
|
||||
|
||||
vec4 byteround(vec4 x) {
|
||||
return round(x * 255.0) / 255.0;
|
||||
return round(x * 255.0) * (1.0 / 255.0);
|
||||
}
|
||||
|
||||
)";
|
||||
|
|
Loading…
Reference in a new issue