/** 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()); }
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; } } }
final float y2 = y1 + region.getRegionHeight() * unitScale; final float u1 = region.getU(); final float v1 = region.getV2(); final float u2 = region.getU2();
final float y2 = y1 + region.getRegionHeight() * unitScale; final float u1 = region.getU(); final float v1 = region.getV2(); final float u2 = region.getU2();
float y2 = y1 + region.getRegionHeight() * unitScale; float u1 = region.getU(); float v1 = region.getV2(); float u2 = region.getU2();
final float u1 = region.getU(); final float v1 = region.getV2(); final float u2 = region.getU2();
final float u1 = region.getU(); final float v1 = region.getV2(); final float u2 = region.getU2();
float u = region.getU(); float v2 = region.getV2(); if (remainingX > 0) {
float u = region.getU(); float v2 = region.getV2(); if (remainingX > 0) {