cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Which GLSL versions can use in Vuforia Studio?

william_shih
6-Contributor

Which GLSL versions can use in Vuforia Studio?

Hi,

 

I try higher version shader in TML (GLSL).

#version 300 es

After I preview the project, I got error message.

Compile error in vertex shader: ERROR: unsupported shader version

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello William,

 

In a shader with this directive 

#version 300 es

can be only compile in a WebGL 2.0 context.

 

So, it is clear that Vuforia Studio and View are using a WebGL 1.0 context.

 

More details here :

https://stackoverflow.com/questions/51428435/how-to-determine-webgl-and-glsl-version/51527789

 

Another way to check and who is more accurate, is to look in the libthingview_wasm.js file provided in each Project created.

We can found a function named createContext.

In this function, we can see :

var ctx = canvas.getContext("webgl", webGLContextAttributes);

 

So, it is webgl 1.0 used and not webgl 2.0.

 

Best regards,

Samuel

View solution in original post

3 REPLIES 3

can you please provide more details ?

Hello William,

 

In a shader with this directive 

#version 300 es

can be only compile in a WebGL 2.0 context.

 

So, it is clear that Vuforia Studio and View are using a WebGL 1.0 context.

 

More details here :

https://stackoverflow.com/questions/51428435/how-to-determine-webgl-and-glsl-version/51527789

 

Another way to check and who is more accurate, is to look in the libthingview_wasm.js file provided in each Project created.

We can found a function named createContext.

In this function, we can see :

var ctx = canvas.getContext("webgl", webGLContextAttributes);

 

So, it is webgl 1.0 used and not webgl 2.0.

 

Best regards,

Samuel

Quick clarifiction : View does not use webGL.   

It uses OpenGL ES 2.0  for IOS/Android.    DirectX 11 for hololens.

 

this is equivalent to webGL1.0 in terms of GLSL shader syntax.

 

 

Top Tags