How to use color buffer with GreasedLine and Thin Instances?

Hello!

I’ve added this property to the material options colorMode: BABYLON.GreasedLineMeshColorMode.COLOR_MODE_MULTIPLY
and a HemisphericLight to the scene in the following PG:

Result:

Docs for colorMode:
https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#colormode

Another approach is this (1 draw call):
You can draw as many lines in instance mode. All the lines will be joined into one mesh so it renders fast.

Docs for instance:
https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#instance-mode

Docs for lazy:
https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#lazy-mode

1 Like