/** Re-applies the uv coordinates from the material's texture region to the uv components of the vertices array */ protected void updateUVs () { TextureRegion tr = material.textureRegion; // left top vertices[U1] = tr.getU(); vertices[V1] = tr.getV(); // right top vertices[U2] = tr.getU2(); vertices[V2] = tr.getV(); // left bot vertices[U3] = tr.getU(); vertices[V3] = tr.getV2(); // right bot vertices[U4] = tr.getU2(); vertices[V4] = tr.getV2(); }
/** Re-applies the uv coordinates from the material's texture region to the uv components of the vertices array */ protected void updateUVs () { TextureRegion tr = material.textureRegion; // left top vertices[U1] = tr.getU(); vertices[V1] = tr.getV(); // right top vertices[U2] = tr.getU2(); vertices[V2] = tr.getV(); // left bot vertices[U3] = tr.getU(); vertices[V3] = tr.getV2(); // right bot vertices[U4] = tr.getU2(); vertices[V4] = tr.getV2(); }
@Override public void setUVRange (TextureRegion region) { if (!(hasUVTransform = (region != null))) { uOffset = vOffset = 0f; uScale = vScale = 1f; } else setUVRange(region.getU(), region.getV(), region.getU2(), region.getV2()); }
public void set (final TextureRegion region) { textureDescription.texture = region.getTexture(); offsetU = region.getU(); offsetV = region.getV(); scaleU = region.getU2() - offsetU; scaleV = region.getV2() - offsetV; }
public void set (final TextureRegion region) { textureDescription.texture = region.getTexture(); offsetU = region.getU(); offsetV = region.getV(); scaleU = region.getU2() - offsetU; scaleV = region.getV2() - offsetV; }
@Override public void setUVRange (TextureRegion region) { if (!(hasUVTransform = (region != null))) { uOffset = vOffset = 0f; uScale = vScale = 1f; } else setUVRange(region.getU(), region.getV(), region.getU2(), region.getV2()); }
public void set (TextureRegion region) { this.u = region.getU(); this.v = region.getV(); this.u2 = region.getU2(); this.v2 = region.getV2(); this.halfInvAspectRatio = 0.5f * ((float)region.getRegionHeight() / region.getRegionWidth()); }
public void set (TextureRegion region) { this.u = region.getU(); this.v = region.getV(); this.u2 = region.getU2(); this.v2 = region.getV2(); this.halfInvAspectRatio = 0.5f * ((float)region.getRegionHeight() / region.getRegionWidth()); }
@Override public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) { final TextureRegion tr = shadowSystem.getCurrentLightProperties().region; shader.set(inputID, tr.getU(), tr.getV(), tr.getU2() - tr.getU(), tr.getV2() - tr.getV()); } };
if(verts[j+1] == row*gridHeight) v = 0f; if(verts[j+1] == (row+1)*gridHeight)v = 1f; u = region.getU() + (region.getU2() - region.getU()) * u; v = region.getV() + (region.getV2() - region.getV()) * v; fullVerts[idx++] = u;
if(verts[j+1] == row*gridHeight) v = 0f; if(verts[j+1] == (row+1)*gridHeight)v = 1f; u = region.getU() + (region.getU2() - region.getU()) * u; v = region.getV() + (region.getV2() - region.getV()) * v; fullVerts[idx++] = u;
final float u2 = region.getU2(); final float v2 = region.getV();
final float u2 = region.getU2(); final float v2 = region.getV();
program.setUniformf(idx + spotShadowsUvTransformOffset, tr.getU(), tr.getV(), tr.getU2() - tr.getU(), tr.getV2() - tr.getV());
public void bindDirectionalShadows (final Attributes attributes) { final DirectionalLightsAttribute dla = attributes.get(DirectionalLightsAttribute.class, DirectionalLightsAttribute.Type); final Array<DirectionalLight> dirs = dla == null ? null : dla.lights; if (dirLightsLoc >= 0) { for (int i = 0; i < directionalLights.length; i++) { if (dirs == null || dirs.size <= i) { continue; } int idx = dirShadowsLoc + i * dirShadowsSize; // Shadow ObjectMap<DirectionalLight, LightProperties> dirCameras = shadowSystem.getDirectionalCameras(); DirectionalLight dl = dirs.get(i); if (shadowSystem.hasLight(dl)) { // UVTransform final TextureRegion tr = dirCameras.get(dl).region; Camera cam = dirCameras.get(dl).camera; if (cam != null) { program.setUniformf(idx + dirShadowsUvTransformOffset, tr.getU(), tr.getV(), tr.getU2() - tr.getU(), tr.getV2() - tr.getV()); // ProjViewTrans idx = dirShadowMapProjViewTransLoc + i * dirShadowMapProjViewTransSize; program.setUniformMatrix(idx, dirCameras.get(dl).camera.combined); } } if (dirLightsSize <= 0) break; } } }
float u2 = region.getU2(); float v2 = region.getV();
final float u1 = region.getU(); final float v1 = region.getV2(); final float u2 = region.getU2(); final float v2 = region.getV();
final float u1 = region.getU(); final float v1 = region.getV2(); final float u2 = region.getU2(); final float v2 = region.getV();
float u2 = region.getU2(); float v = v2 - remainingY / texture.getHeight(); x = startX;
float u2 = region.getU2(); float v = v2 - remainingY / texture.getHeight(); x = startX;