I am trying to apply a texture to a TerrainQuad and not having much luck. Im not splatting and am instead just trying to apply a texture to the entire terrain. Stepping through the code it looks like the texture coords for the meshes go from 0 to TerrainSize. I need the texture coords to go from 0 to 1. I’m trying to update the texture coords by doing the following but it’s not working. I’ll work on simple test case if no one has any ideas. Thanks
List<TerrainPatch> patches = new ArrayList<TerrainPatch>();
page.getAllTerrainPatches(patches);
for( TerrainPatch patch : patches) {
Mesh mesh = patch.getMesh();
float v = 1.0f / (float) page.getTerrainSize();
mesh.scaleTextureCoordinates(new Vector2f(v, v));
}