Widened edge case condition when correcting texcoords

This commit is contained in:
Lucas Dower 2023-01-29 23:23:37 +00:00
parent 268acb5b80
commit 24c688e23a

View File

@ -105,8 +105,8 @@ export class Texture {
}
private _correctTexcoord(a: number) {
if (a === 1.0) {
return 1.0;
if (Number.isInteger(a)) {
return a > 0.5 ? 1.0 : 0.0;
}
const frac = Math.abs(a) - Math.floor(Math.abs(a));
return a < 0.0 ? 1.0 - frac : frac;