Open strohel opened 1 year ago
I found an interesting approach to drawing an infinite grid, with anti-aliasing and fade-out (sometimes called fog):
https://asliceofrendering.com/scene%20helper/2020/01/05/InfiniteGrid/
We don't need anti-aliasing as we're using smaa-rs
, but it might be interesting to borrow some techniques from there, especially the infinite part.
Probably not an issue with your code, but there are rendering artifacts when in perspective mode. This also happens when scaling the model.
Ideally, we wouldn't scale the lines and model when zooming the camera, and that "hack" will go away once @skywhale adds his camera movement code.
This is extremely naive implementation, but firing it just to get going. It seems to work, but I cannot rotate or zoom in the viewer (that's a privilege that only Mac users have at the moment).
Once finalized, fixes #62.