Babylon MeshBuilder CreateLines thickness


When I try to use MeshBuilder.CreateLines to generate some line I would like to alter their thickness using a shader material. Similar to this example done in three js

I’m new to using shaders, so I’m unsure of what I’m doing wrong, it gives me this error. Can anyone please help me? Thanks!

For starters, you deleted the position attribute from the template, so it would follow that the shader can’t use an attribute that it hasn’t seen before :slight_smile: I recommend taking some time to read on how shaders work so you can understand better every one of their components:

LearnOpenGL - Shaders
Microsoft Word - Chapter_1.doc (
WebGL Lesson 1 – A triangle and a square | Learning WebGL (
How Shaders Work in OpenGL - YouTube

And there are many more resources out there. Shaders are definitely a huge learning journey (that never stops really :rofl: ) so don’t feel you have to take it in all at once. Go on your own pace, and the forum will be always happy to help! :smiley: