Shaders are written in GLSL, but there are different versions of GLSL that it might be written in.
Calling this method on a p5.Shader will return the GLSL version it uses, either 100 es or 300 es. WebGL 1 shaders will only use 100 es, and WebGL 2 shaders may use either.
예제
구문
version()
매개변수
반환값
String: The GLSL version used by the shader.
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/p5.Shader.js and open a pull request!
관련 레퍼런스
p5.Shader
A class to describe a shader program.
inspectHooks
Logs the hooks available in this shader, and their current implementation.
modify
Returns a new shader, based on the original, but with custom snippets of shader code replacing default behaviour.
version
Shaders are written in GLSL, but there are different versions of GLSL that it might be written in.