[Fieldtrip] Lighting in FieldTrip

Conal Elliott conal at conal.net
Wed Jan 7 12:26:18 EST 2009


I second David's invitation, widening it to the list. If you have ideas
about interfaces for lighting, please chime in.  Particularly, elegant,
general, functional (unlike the usual steful GL & scene-graph models), and
GPU-friendly.

A model (denotational semantics) and interface for lights is given in the
paper "Programming Graphics Processors Functionally" (
http://conal.net/papers/Vertigo/).  As Ivan also suggested, a light is a
function.

  - Conal

On Wed, Jan 7, 2009 at 8:30 AM, David Sankel <camior at gmail.com> wrote:

> 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
> _______________________________________________
> FieldTrip mailing list
> FieldTrip at haskell.org
> http://www.haskell.org/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/fieldtrip/attachments/20090107/f580da8d/attachment.htm


More information about the FieldTrip mailing list