Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What version of GLSL does WebGL use

Tags:

glsl

webgl

Is this a per device sort of thing? Or is it based on the browser? Sorry for such a basic question but I cant seem to find a straight answer.

like image 453
Kahless Avatar asked Mar 11 '15 18:03

Kahless


People also ask

Does WebGL use GLSL?

WebGL 1.0 only supports GLSL 1.0. 17. (Remember that WebGL is based on OpenGL ES 2.0, which was designed for computing devices with low power and limited processing.)

What version of OpenGL does WebGL use?

WebGL is based on the OpenGL ES 2.0 specification, and retains the semantics of OpenGL ES in order to maximize portability to mobile devices. There are some significant differences in behavior of similar APIs between OpenGL ES 2.0 and the OpenGL API on desktop systems.

What GLSL version should I use?

You pick the GLSL version for the version of OpenGL that is your minimum supported version. If your minimum supported GL version is 2.1, then your GLSL version should be 1.10. If your minimum supported version is GL 4.1, then your GLSL version should be 4.10.

How do I find my WebGL version?

First: Test to see if WebGL is the problem To find out if WebGL is causing the problem, open a browser window and head to http://get.webgl.org. If you DO NOT see a spinning cube, you can try a couple things depending on your browser before contacting our support team.


1 Answers

It is based on OpenGL ES 2.0, and according to the spec, it must support GLSL ES version 1.00. In fact that is all it supports.

On another note, this has been my general reference for GLSL features: http://www.shaderific.com/glsl/

like image 125
Brendan Annable Avatar answered Sep 17 '22 13:09

Brendan Annable