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
Solved! Go to Solution.
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
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.