I've dug a bit deeper into this one - the problem is with the generation of triangle strips from the triangles in the hardware renderer (hwTmesh.c). OpenGL uses whether the triangle (-strip) is defined clockwise or counter-clockwise when it decides whether to use the front or back face when GL_LIGHT_MODEL_TWO_SIDE = GL_TRUE.
Without DXD_HW_TMESH_ORIENT_SENSITIVE defined, the strip generation is free to flip the orientation of the triangle strip. Strangely, this macro is only defined for sun4 / solaris in arch.h. So an initial fix would be to include #define DXD_HW_TMESH_ORIENT_SENSITIVE 1 for all architectures in 'arch.h', but this will loose some strip generating efficiency for single sided rendering. Ideally the strip generator should work as before for single-sided light model, but as with DXD_HW_TMESH_ORIENT_SENSITIVE set for two sided. John David Thompson wrote: > > I looked at your net and did a few tests, and it appears all the > normals are correct and the two sided rendering is indeed in error. > It may be that the normals are not getting sent quite right to > OpenGL. I will file a bug on this and may get a chance to look at it. > > David > > >Hi, > > > >Does anyone know of a fix or work around to get two sided lighting to > >work with isosurface data when hardware rendering? > >At present it seems to be confused with which normal direction to use, > >and the surface is messy, with some areas shiny side out, and some matt. > > > >I've attached an example of the problem. > > > >John > >Content-Type: application/octet-stream; > > name="two_sided_test.net" > >Content-Disposition: attachment; > > filename="two_sided_test.net" > > > >Attachment converted: DataDrive:two_sided_test.net (????/----) (000982EA) > >Content-Type: application/octet-stream; > > name="two_sided_test.cfg" > >Content-Disposition: attachment; > > filename="two_sided_test.cfg" > > > >Attachment converted: DataDrive:two_sided_test.cfg (????/----) (000982EB) > > -- > ............................................................................. > David L. Thompson Visualization and Imagery Solutions, Inc. > mailto:[EMAIL PROTECTED] 5515 Skyway Drive, Missoula, MT 59804 > Phone : (406)756-7472
