View Full Version : quadstripts and normal - howto

02-10-2009, 03:36 PM
My shading for quadstripts does not seem to be right.
It's dark around the corner area where the strips turns 90 degrees.
It looks like averaging notmals at the corner.
Not sure how it calculates the normals of vertex at 90 turn.
I'm using vertex arrays with normals and colors.
The normals I gave were (0,-1,0), (0,-1,0) (1,0,0) for (1), (2)
and (3) as shown below (cross section view).


------------- y
| | ^
| x (3) |
| | |
---------x---x |----> x
(1) (2)

02-10-2009, 03:39 PM
The picture was not displayed properly.
(1) facing -y
(2) corner
(3) facing +x

02-10-2009, 04:07 PM
Very hard to help you with such a poor information... is it possible to have a screenshot?
If it is about normals, try to render them at each vertex using GL_LINES, you will see immediatly if they are correct or not.

02-10-2009, 04:21 PM
also there's an inherent ambiguity with quads and shading stemming from strip orientation and/or that of the triangles themselves - 2 possible triangle configurations with strips or lists. You could try using triangle lists instead to nail down the orientation thing, if that's an issue... kinda depends on what you're modeling too.

(fyi, use the code tags to preserve formatting.)