Wireframe Shader (and `MeshDebugPluginMaterial`) coloring problem w/ custom vertex data. (entire face is black)

PG:

so I’m making my own meshes from scratch using vertex data.

and for those meshes a wireframe shader I made (and also DebugMaterialPlugin) doesn’t work quite right.

For some triangles, the entire triangle is black.

You can see this in the PG

the problem so far I’ve been able to point to is, the triangles aren’t exactly being colored rgb before barycentric threshold happens.

Is there something I’m doing wrong when creating meshes from made up vertex data? (is the problem source in the vertex data?)

I mean, I know it is, cuz it doesn’t happen on normal meshes, but to what extent, can I fix it w/o changing the vertex data?

Any pointers here are super helpful, tysm! : )

cc @alexchuber, the mother of MeshDebugPluginMaterial!

1 Like

nvm it was a lighting thing lol sorry for the bother
edit: https://playground.babylonjs.com/#KPLZWF#21

2 Likes