]> git.tdb.fi Git - libs/gl.git/commit
Refactor projection matrix handling
authorMikko Rasa <tdb@tdb.fi>
Tue, 14 Dec 2021 11:21:25 +0000 (13:21 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 14 Dec 2021 11:28:56 +0000 (13:28 +0200)
commitacd7bb6e23e2aff9934ecf32852c62ba72c13574
tree7bfba6bb1ec94dbeb8c5f9504efa777f3f45a4a2
parent6211e1556df8345ad1c4e7edbd635bccdd7f54f0
Refactor projection matrix handling

Projection matrices in C++ side now always produce a depth range of 0 to
1 for the NDC Z coordinate.  Shaders will convert it to -1 to 1 when
targeting OpenGL.

Incidentally, the AmbientOcclusion effect's shaders were already written
as if the depth range was 0 to 1, so the effect was actually slightly
incorrect before this.
source/backends/opengl/camera_backend.h [deleted file]
source/backends/vulkan/camera_backend.cpp [deleted file]
source/backends/vulkan/camera_backend.h [deleted file]
source/core/matrix.cpp
source/effects/shadowmap.cpp
source/glsl/compiler.cpp
source/glsl/finalize.cpp
source/glsl/finalize.h
source/render/camera.cpp
source/render/camera.h