Make byteround less expensive (thanks hrydgard!)
This commit is contained in:
parent
734279ff22
commit
234161ba62
1 changed files with 4 additions and 4 deletions
|
@ -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