VertexAlpha being ignored by Standard Materials in Lite

It seems that the Standard Material is not using the the vertex alpha even when I run enableVertexColors() before setting the color array.

A workaround I have for now is to set the material alpha and then rebuild the material.

Checking!

Found it! You need to explicitly enable vertex alpha on the mesh:
box3.hasVertexAlpha = true;

Set it before registerScene() . enableStandardVertexColors() enables vertex colors, but alpha remains opt-in because it requires the transparent blending pipeline.

Also, the color loop should use the vertex count ( positions.length / 3 ) rather than positions.length .

Ahh, that seems to work for normal meshes, but it seems that for Thin Instances, it doesnt work.

Thanks for the updated playground!

Gosh! You’re right :slight_smile: this is a separate Lite bug:)

I’ll work on it asap!

fix: honor thin-instance vertex alpha in standard materials by deltakosh · Pull Request #581 · BabylonJS/Babylon-Lite