New version of @WFlyToTheSky's project https://scratch.mit.edu/projects/1388342584/ fixed by chatgpt to remove artifacts
[All by ChatGPT] ChatGPT explanation of the fix: 1. Changes to the original code Both modifications are located in the custom block "Triangle fill at (...)" inside Sprite1. The number of loop iterations was changed from ceiling((y3 - y1) / res) to ceiling((y3 - y1) / (res / 2)). The instruction change yt by (res) was changed to change yt by (res / 2). These changes approximately double the number of horizontal scanlines used to fill each triangle, while halving the vertical distance between them. No other parts of the rendering engine were modified. 2. Why these changes fix the artifacts The original rasterizer sampled triangles at relatively large vertical intervals. Adjacent triangles could therefore leave some pixels uncovered, producing black dots and dashed lines along their boundaries. By doubling the vertical sampling density, the modified version provides more uniform pixel coverage, effectively eliminating the observed artifacts. Unlike approaches that realign scanlines to a fixed grid, this solution preserves each triangle's original starting coordinate, preventing small or thin surfaces from disappearing. The fix significantly improves rendering without changing the geometry, textures, or depth-buffer logic.