flipY: Y-Coordinate Inversion Functions
Vertical Axis Mirroring Transformations
The flipY
functions invert the Y-coordinate while preserving other vector components. These functions handle coordinate system conversions between different graphics APIs and rendering contexts where Y-axis orientation differs.
Mathematical Definition
For any vector , the Y-flip transformation produces:
This transformation maps the range to , effectively mirroring coordinates vertically around the center line .
Function Variants
Input Type | Output | Transformation |
---|---|---|
vec2 | vec2 | |
vec3 | vec3 | |
vec4 | vec4 |
Live Editor
const fragment = () => { const flipped = flipYVec2(uv) return vec4(vec3(flipped, 0.5), 1) }