Node Material not compiling on WebGL 1 if Constant is used

Hi,
I just recognized a bug in node material for WebGL 1. I have made a very simple node material in the following playground. It does not work currently, but if you open it and set the Vector2 Constant to None, the material will work:
https://playground.babylonjs.com/#14H3CM

“14:45:0: Shader compilation error: VERTEX SHADER ERROR: 0:20: ‘u_Vector’ : redefinition”

Another thing I recognised: round is not working for WebGL1 right?
In this playground it is failing, but within the node material I also added a frame as a workaround, by calculating round via fract:
https://playground.babylonjs.com/#14H3CM#1

Adding @Evgeni_Popov

Found the problem but not sure of the fix… Let’s see on the PR.

PR:

Regarding round, I didn’t find a document that would list the functions available in shaders in WebGL 1… It’s possible it is not supported depending on your GPU.

1 Like