Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

remove far plane from perspective projection #2118

Merged
merged 18 commits into from Jun 15, 2020
Merged

Commits on Jun 14, 2020

  1. remove far plane from perspective projection

    I switched to near to 1 and far to 0, which should make depth much more
    accurate.
    
    3d doesn't have a far plane anymore, as it should be much more accurate than
    before even with infinite Z.
    
    Infinite-z does not make sense for orthographic projections, because error must
    be small regardless of distance there.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    59be3b3 View commit details
    Browse the repository at this point in the history
  2. remove zfar from tests

    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    05fa81f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    a60300c View commit details
    Browse the repository at this point in the history
  4. switch debug_lines to GreaterEqual

    This matches the LessEqual it previously had.
    
    It makes debug_lines_ortho render like it did before these changes. I believe
    that rendering later lines on top of earlier ones is the expected behaviour.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    5659bfd View commit details
    Browse the repository at this point in the history
  5. remove projection, put it directly into Camera

    The setters and getters for parts of a projection have been removed. They were
    broken, as the setters did not update the inverse matrix. If updating is
    desired, a new Camera can be build, which should be about as fast.
    
    This commit breaks auto_fov. I'll rewrite that utility in the next commit.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    8cdf9b6 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    6e6f5f4 View commit details
    Browse the repository at this point in the history
  7. near clipping plane from 0.1 to 0.125

    One eighth is a good value because it can be represented accurately unlike one
    tenth.
    
    The small change hopefully doesn't break people's code.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    50fcf7f View commit details
    Browse the repository at this point in the history
  8. fix autofov

    It turns out the calculations needed for auto_fov are already done when
    constructing a perspective matrix.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    cfb68f6 View commit details
    Browse the repository at this point in the history
  9. fix tiles example

    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    52b58fa View commit details
    Browse the repository at this point in the history
  10. update camera when AutoFov changes

    Previously it was only updated when the screen dimensions changed, making it not
    work if the screen is never resized or if parameters are changed.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    53562ae View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    3aab233 View commit details
    Browse the repository at this point in the history
  12. make tests use actual bottom right

    They used to use a version that was off by one pixel for some reason.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    4ea2474 View commit details
    Browse the repository at this point in the history
  13. document the screen coordinate system

    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    40335ef View commit details
    Browse the repository at this point in the history
  14. remove unused import

    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    1a308e0 View commit details
    Browse the repository at this point in the history
  15. remove far plane from gltf

    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    6f2281e View commit details
    Browse the repository at this point in the history
  16. fix test

    May have been broken when rebasing onto newest master.
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    fb20910 View commit details
    Browse the repository at this point in the history
  17. remove unnecessary Projection imports in book

    This may not fix the book but I was unable to build it locally
    joonazan authored and azriel91 committed Jun 14, 2020
    Copy the full SHA
    3b3a743 View commit details
    Browse the repository at this point in the history
  18. Copy the full SHA
    bbb4e54 View commit details
    Browse the repository at this point in the history