VNormPos provides a 2D fragment screen position, adjusted for screen width and height and normalized to [-1, +1] in the shortest dimension, to ensure a square aspect ratio and full range of coordinates in the shortest pixel dimension. This example window is created with the default width of 800 and height of 600, so is therefore wider than it is tall. To adjust for this NormPos varies from -1 to +1 in the vertical axis but from -1.333 to +1.333 in the horizontal axis.
Supported Rates: shape, pixel
Make a VNormPos VGen at requested rate.
The position of the fragment or vertex in normalized space.
dimensions
input | output |
none | 2 |
Because the example window is wider than it is tall, the circle generated is just touching the top and bottom of the frame and is centered in the horizontal frame with some space on either side to spare.