sholloway / agents-playground

MIT License
4 stars 0 forks source link

Incorrect Projection #152

Open sholloway opened 2 weeks ago

sholloway commented 2 weeks ago

Summary

The current projection pipeline is not correctly mapping to clip space on the Z-axis.

Desired Behavior

3D vertices need to go through a series of transformations.

  1. Model Space to World Space
  2. World Space to Camera Space
  3. Camara Space to Clip Space
  4. Clip Space to Window Space

The clip space is a 3D cube defined by it's three axes I, J, K where: Per: https://carmencincotti.com/2022-05-02/homogeneous-coordinates-clip-space-ndc/ Every vertex (x, y, z, w) has it's own clip space in which it exists. Where:

-w <= x <= w
-w <= y <= w
0 <=z <= w

Root Cause

Possible Solutions

Resources