Skip to content
Snippets Groups Projects
Select Git revision
  • 8c76d8a9055e716cb0f15a286a7351b004a2e353
  • master default protected
2 results

shader.js

Blame
  • shader.js 710 B
    var fragmentShaderSource = '\
        varying mediump vec4 color; \
        varying mediump vec2 texCoord;\
        uniform sampler2D sampler2d; \
        void main(void) \
        { \
            gl_FragColor = color + texture2D(sampler2d, texCoord); \
        }';
    var vertexShaderSource = '\
        attribute highp vec3 myVertex; \
        attribute highp vec4 myColor; \
        attribute highp vec2 myUV; \
        uniform mediump mat4 Pmatrix; \
        uniform mediump mat4 Vmatrix; \
        uniform mediump mat4 Mmatrix; \
        varying mediump vec4 color; \
        varying mediump vec2 texCoord;\
        void main(void)  \
        { \
            gl_Position = Pmatrix*Vmatrix*Mmatrix*vec4(myVertex, 1.0);\
            color = myColor; \
            texCoord = myUV; \
        }';