Table of Contents

Method GetPixelCountByMeshResolution

Namespace
Pinwheel.Griffin
Assembly
Pinwheel.Polaris.Runtime.dll

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

meshResolution int

The MeshResolution

chunkGridSize int

The ChunkGridSize

Returns

int

The number of pixel or vertex location of the whole terrain.