Failed to Compile Vertex Shader Issue

Hi team,
I am currently working on a multiplayer project implementation that integrates photon server and I am facing the error failed to compile vertex shader at random times which stops the project from launching
I am working on Chrome Browser in windows.
VertexShaderIssue

Could you help me understand what causes the said issue

Failed to compile vertex shader:

1: #version 300 es

2:

3:

4: #define attribute in

5: #define varying out

6: #define texture 2D texture

7:#define GL2

8: #define VERTEXSHADER

9: varying vec3 vPositionW;

10: varying vec3 vNormalW;

11: varying vec2 vUv0;

12: attribute vec3 vertex_position;

13: attribute vec3 vertex_normal;

14: attribute vec4 vertex_tangent;

15: attribute vec2 vertex_texCoord0;

16: attribute vec2 vertex_texCoord1:

17: attribute vec4 vertex_color;

18:

19: uniform mat4 matrix_viewProjection;

20: uniform mat4 matrix_model;

21: uniform mat3 matrix_normal:

Could you post a larger screenshot? I cannot read the text on this.

Also, please open the debug console in your browser, and post what’s there … usually that contains more detailed report.

If you can post a link to the project, that would be great as well

Here is the project link
(PlayCanvas | HTML5 Game Engine)

Seems to load fine here:

1 Like

Hi, As I have mentioned it is occurring randomly, due to which I’m unable to reproduce the error

Failed to compile vertex shader:

1: #version 300 es

2:

3:

4: #define attribute in

5: #define varying out

6: #define texture 2D texture

7:#define GL2

8: #define VERTEXSHADER

9: varying vec3 vPositionW;

10: varying vec3 vNormalW;

11: varying vec2 vUv0;

12: attribute vec3 vertex_position;

13: attribute vec3 vertex_normal;

14: attribute vec4 vertex_tangent;

15: attribute vec2 vertex_texCoord0;

16: attribute vec2 vertex_texCoord1:

17: attribute vec4 vertex_color;

18:

19: uniform mat4 matrix_viewProjection;

20: uniform mat4 matrix_model;

21: uniform mat3 matrix_normal:

Is that the full error stack from the browser dev tools?

Can you also run WebGL Report please and post the results


I will share the full error stack once I encounter the issue again

1 Like

Hi yaustar,

The verter shader error stack for our private project is shared below, could you provide an insight on the issue
The materials referred have changed from the last time we encountered the issue

@mvaligursky Any ideas on this one? Could it be related to the use of the WebXR emulator?

@Sripal Are you able to share the project it happens on?

The only times I’ve seen shader compilation to fail with no real error message is when there is something wrong with the webgl instance … for example if the context is lost. I’ve seen few discussion around this online, with no answers unfortunately.

1 Like

Hi @mvaligursky @yaustar

I cannot share the project here as it is private.
We are losing the webGL context sometimes, could you let me know how we can handle the issue for a production ready application.

I’m afraid we don’t have any real answers here as the times I’ve had it before was due to a hardware driver and Chrome combination issue

eg
https://bugs.chromium.org/p/chromium/issues/detail?id=1302938