VT redraw on request

Former-commit-id: 3ada71215d9291760704a982cc3952061dbc7afe
Former-commit-id: ca1495e668e88bc7214429472ad918621a650189
This commit is contained in:
Song Minjae
2017-01-24 00:50:12 +09:00
parent 92cc8ff94b
commit f46991ffbb
9 changed files with 189 additions and 43 deletions

1
assets/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.{psd,tga,ogg} filter=lfs diff=lfs merge=lfs -text

16
assets/test.frag Normal file
View File

@@ -0,0 +1,16 @@
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
uniform mat4 u_projTrans;
void main() {
vec3 color = texture2D(u_texture, v_texCoords).rgb;
float gray = (3.0 * color.r + 4.0 * color.g + color.b) / 8.0;
vec3 grayscale = vec3(gray);
gl_FragColor = vec4(grayscale, 1.0);
}

14
assets/test.vert Normal file
View File

@@ -0,0 +1,14 @@
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord0;
uniform mat4 u_projTrans;
varying vec4 v_color;
varying vec2 v_texCoords;
void main() {
v_color = a_color;
v_texCoords = a_texCoord0;
gl_Position = u_projTrans * a_position;
}