
7 Jan
2009
7 Jan
'09
5:20 p.m.
Hi David, David Sankel wrote:
I think the concept of a light (omni/directional) goes beyond OpenGL.
Sure. As do the concepts of shadows, reflection, refraction, etc, none of which have specialized constructs in OpenGL. You could add them which would increase complexity. An alternative is to get rid of special cases without losing any functionality, quite the opposite in fact. That was hard before shaders but much easier now.
The lighting models are just simple functions and with shaders they are best represented as such.
Perhaps you could post a haskell interface of the alternative light structure you have in mind. I think it'd help the discussion.
A function! Ivan