17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 21:00:03 +01:00
Files
maszyna/rendering/opengl46/opengl46renderer.cpp
miloszunio 3a4b878304 fix(gl46): read back the editor cursor depth and correct the depth pass bias
GL46 read the depth under the editor cursor in the depth pass of the scene, drawn with glPolygonOffset(-1, -1), and took it as it was: the ground came out about a pixel row farther than it lies (metres at a grazing angle). Same correction as 7078edf for vulkan: a 3x3 block read back, the slope and the unit of the bias taken back. The depth is also worked out in the view of the frame it was asked in, and the point kept in world space, so a moved cursor or camera does not shift it. See #238.
2026-11-01 13:12:01 +01:00

291 KiB