Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Can you draw points at infinity with OpenGL? Sure, why not?
2 points by grondilu on July 10, 2015 | hide | past | favorite | 1 comment
So I'm working on a webGL version of the space game Oolite. I've reported progress here:

http://aegidian.org/bb/viewtopic.php?f=5&t=17574

When trying to display the stars, I was a bit annoyed by the idea of making the stars as points on a sphere of large radius. I didn't want to pick a fake radius (not nearly as large as interstellar distances) that would fit inside the view frustrum. I wanted to put the stars in a correct scale, that is very far away, or even at infinity.

But then how would they fit into the viewing frustrum? Well, why not creating an infinite frustrum?

That's what I did:

http://grondilu.github.io/oolite/test-coriolis.html



That's been around since around 2003 at least : http://www.slideshare.net/Mark_Kilgard/robust-stenciled-shad... see slide 25...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: