mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01: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 New Issue
Block a user