Skip to content

orthoOffCenter #5

@RobDangerous

Description

@RobDangerous

The orthoOffCenter matrices are either more clever than I can grasp or they are a little broken. They multiply y with zNear but not x - it should be either both or none. Also, they apply the x/y-translations in the addend which is multiplied with z, but for that to work correctly they should set w to z to cancel out the multplication with z.

Changing those, the orthoOffCenterLH matrix looks like this:

2.0_zNear/(right-left), 0.0, 0.0, 0.0,
0.0, 2.0_zNear/(top-bottom), 0.0, 0.0,
-1.0-2.0_left/(right-left), 1.0+2.0_top/(bottom-top), 1.0/(zFar-zNear), 1.0,
0.0, 0.0, zNear/(zNear-zFar), 0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions