-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi. Flat shading is not supported explicitly in three-d, so I guess that's a feature request (I saw you made the issue #397 as well). You can still enable flat shading though, it's just a bit cumbersome. You need to split your mesh where there's an edge and make duplicate vertices and then compute the normals again. So if you want every triangle to be flat shaded, you can't use an index buffer but have to have three vertices for each triangle and the normal for all three vertices must be the normal of the triangle. The default cube mesh is constructed like that if you need an example. That's why the cube have a hard edge in the shapes example. |
Beta Was this translation helpful? Give feedback.
Hi.
Flat shading is not supported explicitly in three-d, so I guess that's a feature request (I saw you made the issue #397 as well). You can still enable flat shading though, it's just a bit cumbersome. You need to split your mesh where there's an edge and make duplicate vertices and then compute the normals again. So if you want every triangle to be flat shaded, you can't use an index buffer but have to have three vertices for each triangle and the normal for all three vertices must be the normal of the triangle. The default cube mesh is constructed like that if you need an example. That's why the cube have a hard edge in the shapes example.