Flat-shading

Blitz3D Forums/Blitz3D Programming/Flat-shading

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yep, flag 4 is a bodge. To do flat shading properly, you need surface normals to light it, which blitz meshes (or is it DX?) doesn't support. Flag 4 simply causes each triangle to be lit using one of it's vertex normals, as if it were a surface normal. Unfortunately, vertex normals are usually smoothed and so will not be perpendicular to the triangle.

John, if you simply want to load a mesh in your app and have it display using flat shading, then you're out of luck, I'm afraid. Your only real option is to do what Peter says and rebuild the mesh.