Edit:
Files are now hosted properly. Go to
http://bjgil.totallyrecalled.net
The first (and only) article on the front page has both the Java and Win32 versions attached. Hopefully it will work this time.
Hi all,
I saw a post over at gamedev.net
(http://www.gamedev.net/community/forums/topic.asp?topic_id=495465)
about computing atmosphere lookup tables.
I decided it would be much improved if the C code that he released was running in Java :P.
So, here it is. Nearly everything is done in shaders so and it uses 8 texture units. There is also a slight problem I found when running this on my laptop. In inscatterS.glsl I have commented out a line that causes a very nasty crash where the laptop’s display driver stops responding. The same thing happened with the C version so its probably a driver problem. The same shader code worked fine on my desktop. So… you can pop that line back in if you think your gfx card driver is bug free.
If the link/download is broken, send me a PM and i’ll email you the zip, its only ~90k.
Controls:
left-mouse to move the sun
shift + left-mouse to rotate the earth
ctrl + left-mouse to rotate the scene
up and down arrows to change altitude
Cheers,
Brett