GreasedLine.setPoints broken?

Hello :slight_smile:

Coming back to my wire physics project I noticed that the lines between points won’t render :


After a quick investigation, it appears it comes from GreasedLine.setPoints method.
Here is a minimalist PG to reproduce :

(Comment line 28 and the GreasedLine is back)


@roland, a recent commit must have changed something in the last days/weeks

I’m seeing a growing square in the second link. And lines between balls on the first link. (Babylon Version 7.36.0 using WebGL2).

It looks correct to me. Am I missing something?

Are you ? :thinking: Then it might me hardware or OS related. On first link I have no gray lines, on second link I have blank render without any square…


  • BabylonJS 7.36.0 WebGL2
  • Ubuntu 22.04
  • Google Chrome Version 131.0.6778.85 (Official Build) (64-bit)

EDIT : With WebGPU it works, but slow as hell :thinking: . With WebGL2, no GreasedLine after setPoints call …

WebGPU works for me and is slow for me also.

And yes, WebGL2 and WebGL both work for me, display lines, and are faster. I think GreasedLine support with WebGPU is in progress.

Looks like it might be related to parallel shader compilation https://playground.babylonjs.com/#H1LRZ3#669

What is happening is that the shader is deleted/created everyframe cause setIndices will end up recreating subMeshes which are the one holding the shader.

I will work on it with @Evgeni_Popov tomorrow and probably @Deltakosh on Monday.

Sorry for the inconvenience.

1 Like

On it!

1 Like

Fix disposing of effects for submeshes by deltakosh · Pull Request #15910 · BabylonJS/Babylon.js

2 Likes

Just testing newly-enabled webm upload.

1 Like