graphics: Change the number of floats for a vertex from 10 to 12

This is a preparation for Metal, that forces 4 floats for a vertex
position.
This commit is contained in:
Hajime Hoshi
2018-11-17 15:30:09 +09:00
parent d2595c5be7
commit 7586c660d5
4 changed files with 64 additions and 54 deletions

View File

@@ -48,7 +48,7 @@ func shaderStr(id shaderID) string {
const (
shaderStrVertex = `
uniform mat4 projection_matrix;
attribute vec2 vertex;
attribute vec4 vertex;
attribute vec4 tex_coord;
attribute vec4 color_scale;
varying vec2 varying_tex_coord;
@@ -66,7 +66,7 @@ void main(void) {
varying_tex_coord_max = vec2(1, 1);
}
varying_color_scale = color_scale;
gl_Position = projection_matrix * vec4(vertex, 0, 1);
gl_Position = projection_matrix * vertex;
}
`
shaderStrFragment = `