Geometry drawn with the vertex()
function default to all vertices having a constant normal (which is (0, 1, 0)
I think). Fortunately in the latest version (1.4.0) a feature I implemented was added: a function to set the normal vector for the next vertex. Alternately you can create custom p5.Geometry and use calculateNormals()
.
1 Like