Method GetPixelCountByMeshResolution
GetPixelCountByMeshResolution(int, int)
Calculate the number of 'vertex location' or 'height map pixel count' corresponding to meshResolution value. This tells the exact number of height map pixel on one axis (X-axis or Z-axis) needed to map 1 location to 1 pixel. This value calculated for the whole terrain, GetPixelCountByMeshResolutionForSingleChunk(int) to get the value for one chunk.
public static int GetPixelCountByMeshResolution(int meshResolution, int chunkGridSize)
Parameters
meshResolutionintThe MeshResolution
chunkGridSizeintThe ChunkGridSize
Returns
- int
The number of pixel or vertex location of the whole terrain.