From: Jason Daly (jdaly++at++ist.ucf.edu)
Date: 09/07/2005 07:13:38
Vincent Pasqualato wrote:
>Hi !
>
>Trying to combine a shader program written in GLSL with a Performer scene
>graph, we discovered that rendering an flt object with faces which are flats
>(no gouraud/interpolation, no vertex normals) gives us strange results :
>The flt loader seems to try some computation of vertex normals, because
>there is a variation of the normal we get from Open GL (in gl_Normal
>parameter of the shader program) across the faces. Plus, this interpolation
>is buggy, resulting in very strange patterns of normals on the object.
>If we transform our object in gouraud, and pre-compute the vertex normals,
>the rendering is OK, except we don't get the flat faces we would want.
>Does anyone have a suggestion about this behaviour ? Is there an option to
>deactivate this normal computation ? Or is it correct, assuming the classic
>OpenGL pipeline doesn't take into account vertex normals when rendering flat
>faces ?
>
>
There is supposed to be:
pfdConverterMode_flt(PFFLT_COMPUTENORMALS, PF_OFF);
but last time I tried, it didn't work.
>Also, another problem with flt loader and Shaders is the fact that the
>loader seems to make some pre-computation on vertex colors and face
>materials : vertex colors seems to be multplicated by the diffuse color of
>the faces, and ambient and diffuse color of the face seem also to be
>affected by the color of the vertex. Although this doesn't affect classic
>OpenGL rendering, it is incompatible with our shader, which make a different
>use of this colors and need them untransformed.
>
>
I think there's supposed to be a mode for this as well, but I can't pick
it out just from the pfflt.h file (and it probably wouldn't work
anyway). Performer used to ship with the pfdConverterMode_flt man page,
but no longer. The loader is also several years out of date (I think
it's only good for versions 15.7 and earlier). I know MPI stopped
supporting their Performer loader a while ago, and SGI hasn't kept up
with OpenFlight versions since 15.7.
----"J"
"I'm a castaway stranded in a desolate land, I can see the footprints in the virtual sand." --Neil Peart
This archive was generated by hypermail 2b29 : Wed Sep 07 2005 - 07:13:53 PDT