czm_viewportOrthographic
An automatic GLSL uniform representing a 4x4 orthographic projection matrix that
transforms window coordinates to clip coordinates. Clip coordinates is the
coordinate system for a vertex shader's gl_Position
output.
This transform is useful when a vertex shader inputs or manipulates window coordinates
as done by BillboardCollection.
Do not confuse czm_viewportTransformation with czm_viewportOrthographic
.
The former transforms from normalized device coordinates to window coordinates; the later transforms
from window coordinates to clip coordinates, and is often used to assign to gl_Position
.
Example
// GLSL declaration uniform mat4 czm_viewportOrthographic; // Example gl_Position = czm_viewportOrthographic * vec4(windowPosition, 0.0, 1.0);
- uniformState#viewportOrthographic
- czm_viewport
- czm_viewportTransformation
- BillboardCollection