Select Git revision
Forked from
HyukSang Kwon / 1801_OS_assignment4
Source project has a limited visibility.
-
HyukSang Kwon authoredHyukSang Kwon authored
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; \
}';