Static
fragmentThis static property is overridden by subclass shaders to the GLSL source code for a Fragment Shader program.
MyShader.fragmentShaderSource = `
#ifdef GL_ES
# ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
# else
precision lowp float;
# endif
#endif
varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor;
}
`;
Static
vertexVertex Shader GLSL Source Code
This default shader program is replaced by subclass shaders to the GLSL source code for a Vertex Shader program.
DefaultShader.vertexShaderSource = `
#ifdef GL_ES
# ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
# else
precision lowp float;
# endif
#endif
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
uniform vec2 projection;
varying vec2 vTextureCoord;
varying vec4 vColor;
void main(void){
gl_Position = vec4(aVertexPosition.x * projection.x - 1.0, aVertexPosition.y * -abs(projection.y) + 1.0, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vColor = aColor;
gl_Position.y = -sign(projection.y) * gl_Position.y;
}
`;
Protected
_attribProtected
_setProtected
_uniformProtected
afterProtected
beforeProtected
disableProtected
drawProtected
enableProtected
getProtected
getProtected
redrawProtected
setProtected
setupProtected
use
Fragment Shader GLSL Source Code