Open rpavlik opened 12 years ago
As per Ryan's suggestion, here is an example of how I created the "flashlight effect".
https://gist.github.com/a91bc1880f2aa3c65adb
It is pretty easy to modify in terms of brightness, beam radius, ect.
Can you work with leif to trim this down to the minimum useful and add comments as to how you might want to change values (and which to not change)
I do believe it is more 'bare-bones' now.
Ah, very nice! Didn't realize you had updated it. A few little comments:
local
, and perhaps name them more like myLight
instead of light1 (since by default it's actually using OpenGL's light 0 slot)Perhaps some of these actually suggest that there should be multiple examples - first one like this, then one with a sphere at the light source, or maybe a set of axes. Nice work! Please work with Leif to get this good to go and in - and poke him about the two pull requests he made that I touched up and re-submitted: one of them is for lighting which would give you a place to put this, and I want to make sure I'm representing what he did correctly before merging it.
@jane-peters - I think this would be a good one for you.