|
|
@ -135,8 +135,8 @@ public class LODGeomap extends GeoMap { |
|
|
|
float offsetX = offset.x + (offsetAmount * 1.0f); |
|
|
|
float offsetX = offset.x + (offsetAmount * 1.0f); |
|
|
|
float offsetY = -offset.y + (offsetAmount * 1.0f);//note the -, we flip the tex coords
|
|
|
|
float offsetY = -offset.y + (offsetAmount * 1.0f);//note the -, we flip the tex coords
|
|
|
|
|
|
|
|
|
|
|
|
store.set((((float) x) + offsetX) / (float) totalSize, // calculates percentage of texture here
|
|
|
|
store.set((((float) x) + offsetX) / (float) (totalSize ), // calculates percentage of texture here
|
|
|
|
(((float) y) + offsetY) / (float) totalSize); |
|
|
|
(((float) y) + offsetY) / (float) (totalSize )); |
|
|
|
return store; |
|
|
|
return store; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -733,12 +733,16 @@ public class LODGeomap extends GeoMap { |
|
|
|
tangent.x = (edge2uv.y * edge1.x) * factor; |
|
|
|
tangent.x = (edge2uv.y * edge1.x) * factor; |
|
|
|
tangent.y = 0; |
|
|
|
tangent.y = 0; |
|
|
|
tangent.z = (edge2uv.y * edge1.z) * factor; |
|
|
|
tangent.z = (edge2uv.y * edge1.z) * factor; |
|
|
|
if (normalize) tangent.normalizeLocal(); |
|
|
|
if (normalize) { |
|
|
|
|
|
|
|
tangent.normalizeLocal(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
binormal.x = 0; |
|
|
|
binormal.x = 0; |
|
|
|
binormal.y = (edge1uv.x * edge2.y) * factor; |
|
|
|
binormal.y = (edge1uv.x * edge2.y) * factor; |
|
|
|
binormal.z = (edge1uv.x * edge2.z) * factor; |
|
|
|
binormal.z = (edge1uv.x * edge2.z) * factor; |
|
|
|
if (normalize) binormal.normalizeLocal(); |
|
|
|
if (normalize) { |
|
|
|
|
|
|
|
binormal.normalizeLocal(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return tangent; |
|
|
|
return tangent; |
|
|
|
} |
|
|
|
} |
|
|
|