Open kevancress opened 2 years ago
Started in 3b78e21272302075a6e09d46347935f6ae346ecf
Depth testing is significantly improved for outside corners with these commits:
583a4f6d306bd68d7452c914f7c30cbcb9cdbce3 5604305566432967e009953c76ab6445f7f3b068 e0a440721bfb27e7834ed8f485ee1ed56dffefde
This does sampling of adjacent pixels based on the screen space normal, if any of the spine sample, inner normal or outer normal return true, then the point is considered visible.
I could probably use some of the techniques from here: https://github.com/ssloy/tinyrenderer/wiki/Lesson-1:-Bresenham%E2%80%99s-Line-Drawing-Algorithm
and here: https://github.com/ssloy/tinyrenderer/wiki/Lesson-2:-Triangle-rasterization-and-back-face-culling
to improve my vector depth sampling. Getting the pixel with the least error distance to the vector, line and sampling it, rather than aggregating samples from all adjacent pixels should be more accurate and faster.