GL_QUADS acting weirdly

My program renders a scene from different viewpoints, saves results to textures, and then renders meshes using those textures into the output buffer. Ideally it should simulate a wide angle camera.

The scene itself is a box, with 6 square faces, illuminated by a point light source. If I render the faces using GL_POLYGON, the result (composed from different viewpoints) looks seamless. But if I use GL_QUADS I can see the edges between meshes for different channels (polygons are illuminated slightly differently).
This problem only happens when I use a point light, it looks fine with directional light.

Does GL_QUADS triangulate differently depending on the frustum or something?

There’s ProvokingVertex, but that’s for flat shading. :wink:

Do you use OpenGLs fixed function lighting ? If so, it computes lighting per vertex and then interpolates for all fragments. In that case it MIGHT give different results for polygons and quads (it shouldn’t, but that’s an area where driver quality is not considered important).

You can always fix it by using shaders and computing per-pixel lighting yourself.

Jan.