Fwd: [Fieldtrip] Lighting Patch for Fieldtrip

David Sankel camior at gmail.com
Wed Jan 7 11:30:15 EST 2009


On Wed, Jan 7, 2009 at 10:31 AM, Ivan Tomac <tomac at pacific.net.au> wrote:
> David Sankel wrote:
>> The FieldTrip.Light structure, from a semantic point of view, gives
>> access to a lot of common light models and is independent of the
>> underlying OpenGL operations.
>>
>> If the back-end code is completely replaced with GLSL, it will just be
>> a matter of setting "uniform variables" instead of glLight calls in
>> renderLightIO and possibly expanding the Light structure with more
>> funky light forms.
>
> Yes the code behind it could be changed to use shaders and all that would do
> is emulate legacy OpenGL.

The shaders themselves could render using a variety of styles besides
Blinn-Phong using these light structures while also allowing
procedural textures and special material simulations like skin.

Of course the parameters of a light, specifically the color
parameters, may be different for different shader models.

> These concepts are tied to legacy OpenGL.

I think the concept of a light (omni/directional) goes beyond OpenGL.
The exposed parameters make most sense for Blinn-Phong models which
are the most common. Like I mentioned, it would be easy to expand on
these structures.

> 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.

David

-- 
David Sankel


More information about the FieldTrip mailing list