GradientMaterial for lines?

I’ve seen the documentation to create a gradient and the live example (playground.babylonjs .com/#2IFRKC#63)

I’d like to create a gradient on lines created using MeshBuilder.CreateLines.

Here’s what I’ve tried:

But it doesn’t work at all.

Thanks for any help :slight_smile:

Well… I thought the colors array wasn’t interpolating the values but it actually is doing exactly that… My bad. Closing :angel:

1 Like