surface getting lit badly...

I’m rendering a surface composed of quads (i havn’t been able to get triangle_strips to work properly) from
an array like this,

float surfacedata[xsize][ysize];

I’m suspicious of using quads, since I’m worried
they might contain non-coplanar points… maybe
this is the proble, I don’t know.

Anyway, what happens is that when I light the surface,
part of it is kinda missing, with “scratches” in it, or
rather black lines that go in the z direction and obscure
the near side of the surface (you can see through to
the other side of the surface)

What could be causing this? thought?

thanks much!

I do not think that you have to worry about using quads. The are splited to triangles anyway.

The artifacts you describe is strange. Almost sounds like some kind of Z fighting trouble.

You DO have to worry about using quads if the vertices are not coplanar. Trying to use quads or polygons that are not coplanar will give undefined results. If you think your quads might not all be coplanar, that could be part of the cause of your problem.