I like my triangles :) What can I do to see them, and avoid smoothing between adjacent faces?
I would still like the lights to be correctly calculated. Do I have to write my own shader for this?
OPENGL has a "flat" keyword to avoid interpolation. But I think Processing shaders are based on OPENGL ES 2.0, which means the only way to get no interpolation is to create triangles one by one, so they don't share edges. I'll keep searching.
Funny that the linked website says "Flat shading ... is useful for non-curved surfaces (like cubes), but looks bad otherwise". I find Gourand much uglier than flat :)
I wonder if I could get flat by messing up the normals...
How about defining the normal per vertex using two edges of the triangle to get a cross product and get a perpendicuar vertex to the given edges... instructions here: http://www.opengl.org/wiki/Calculating_a_Surface_Normal
Answers
This is the closest answer I've found: http://ruh.li/GraphicsShading.html
OPENGL has a "flat" keyword to avoid interpolation. But I think Processing shaders are based on OPENGL ES 2.0, which means the only way to get no interpolation is to create triangles one by one, so they don't share edges. I'll keep searching.
Funny that the linked website says "Flat shading ... is useful for non-curved surfaces (like cubes), but looks bad otherwise". I find Gourand much uglier than flat :)
I wonder if I could get flat by messing up the normals...
this might be of help http://forum.processing.org/two/discussion/4699/face-normals-rather-than-vertex-normals-in-triangle-strip#Item_5
Thanks for the link. I guess I have to read the source code of Toxiclibs to see how it's achieved there.
other option: draw each triangle seperately (no triangle strip)
Yes, thanks, that's what I wrote above:
How about defining the normal per vertex using two edges of the triangle to get a cross product and get a perpendicuar vertex to the given edges... instructions here: http://www.opengl.org/wiki/Calculating_a_Surface_Normal