| 38 | } |
| 39 | |
| 40 | ivec2 wrapCoord(ivec2 uv, ivec2 edge) |
| 41 | { |
| 42 | uv = imod(uv, edge); |
| 43 | uv.x += (uv.x < 0) ? edge.x : 0; |
| 44 | uv.y += (uv.y < 0) ? edge.y : 0; |
| 45 | return uv; |
| 46 | } |
| 47 | |
| 48 | // Approximate the distortion that happens in software when floor and ceiling textures are not 64x64. |
| 49 | ivec2 wrapCoordFlat(ivec2 uv, ivec2 edge) |
no test coverage detected