PolygonLayer: repeat pattern textures

This commit is contained in:
Hannes Janetzek 2013-10-06 21:13:06 +02:00
parent 3b92134b2a
commit 6a28480510

View File

@ -195,7 +195,7 @@ public final class PolygonLayer extends RenderElement {
if (enableTexture && a.texture != null) {
shader = texShader;
setShader(texShader, m);
float num = (Tile.SIZE / a.texture.width) >> 1;
float num = FastMath.clamp((Tile.SIZE / a.texture.width) >> 1, 1, Tile.SIZE);
float transition = Interpolation.exp5.apply(FastMath.clamp(scale - 1, 0, 1));
GL.glUniform2f(hPolygonScale[1], transition, div / num);