setCustomProjection

fun Camera.setCustomProjection(inProjection: Transform, near: Double = getNear().toDouble(), far: Double = cullingFar.toDouble(), inProjectionForCulling: Transform = inProjection)

Sets a custom projection matrix.

The projection matrices must define an NDC system that must match the OpenGL convention, that is all 3 axis are mapped to -1, 1.

Parameters

inProjection

custom projection matrix for rendering.

inProjectionForCulling

custom projection matrix for culling.

near

distance in world units from the camera to the near plane. The near plane's position in view space is z = -near. Precondition: near 0 for Projection.PERSPECTIVE or near != far for Projection.ORTHO.

far

distance in world units from the camera to the far plane. The far plane's position in view space is z = -far. Precondition: far near for Projection.PERSPECTIVE or far != near for Projection.ORTHO.