cnlohr / noeuclid

Non-euclidean GPU Raytraced Game
BSD 3-Clause "New" or "Revised" License
645 stars 48 forks source link

add simple ambient lighting #4

Closed phiresky closed 9 years ago

phiresky commented 9 years ago

I added some simple lighting using the normal vector. It seems like you already had some lighting things, but they're not in use? Screenshots: http://imgur.com/a/tHWAB This adds a lot of realism and makes the scenes far easier to comprehend. But you might want a more complex implementation than this, I'm not sure.

cnlohr commented 9 years ago

You're going to have to do something to make it material-dependent, too. Laval looks jankey. I guess one could peek around with the tileattribs.txt

phiresky commented 9 years ago

What you had before (directly above this code) is already very similar - not sure why it looks less convincing. Please revert this @cnlohr and instead make the sun/moon more intense..

cnlohr commented 9 years ago

I've already modified it heavily to add per-tile stuff. Notice how the lava glows. You may modify that shader freely.