Approximate the distortion that happens in software when floor and ceiling textures are not 64x64.
| 47 | |
| 48 | // Approximate the distortion that happens in software when floor and ceiling textures are not 64x64. |
| 49 | ivec2 wrapCoordFlat(ivec2 uv, ivec2 edge) |
| 50 | { |
| 51 | int coord = (uv.x & 63) * 64 + (uv.y & 63); |
| 52 | uv = wrapCoord(ivec2(coord / edge.y, coord), edge); |
| 53 | uv.x += (uv.x < 0) ? edge.x : 0; |
| 54 | uv.y += (uv.y < 0) ? edge.y : 0; |
| 55 | return uv; |
| 56 | } |
| 57 | |
| 58 | vec2 wrapCoordF(vec2 uv, vec2 edge) |
| 59 | { |
no test coverage detected