ClipFixup class abstract final

The one place the engine's clip space meets Flutter GPU's.

The renderer's projections put y down in clip space (JustMatrix4.setPerspectiveYDown), the way a 2-D canvas works. Flutter GPU puts clip-space +Y at the top of the image (measured; see ARCHITECTURE.md). The renderer multiplies every projection by a y flip once, here, instead of every shader knowing about it.

Flipping y mirrors the image, so a triangle's winding as seen on screen flips too: front faces are chosen with frontFaceIsClockwise.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

flipY(Matrix4 projection, Matrix4 out) → void
Writes projection with clip-space y negated into out. out may be projection itself.

Constants

frontFaceIsClockwise → const bool
Whether, after flipY, a triangle the engine considers front-facing (counter-clockwise around a normal pointing at the camera, as glTF winds them) has to be declared clockwise to Flutter GPU. It does not: test/gpu/device_test.dart ("back-face culling keeps a triangle that faces the camera") checks this.