czm_pixelSizeInMeters

czm_pixelSizeInMeters

An automatic GLSL uniform representing the size of a pixel in meters at a distance of one meter from the camera. The pixel size is linearly proportional to the distance from the camera.

Like all automatic uniforms, czm_pixelSizeInMeters does not need to be explicitly declared. However, it can be explicitly declared when a shader is also used by other applications such as a third-party authoring tool.

Example
// GLSL declaration
uniform float czm_pixelSizeInMeters;

// Example: the pixel size at a position in eye coordinates
float pixelSize = czm_pixelSizeInMeters * positionEC.z;
Source: