draw spinning quad with a texture instead of smoothed colors
This commit is contained in:
1 parent
d34c51acf9
commit
758435fd63
6 files changed
+47
-20
No files matched your search
@@ -1,7 +1,8 @@
|
||||
|
||||
varying vec3 color_i;
|
||||
varying vec2 tex_coord_i;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(color_i, 1);
|
||||
gl_FragColor = texture2D(tex, tex_coord_i);
|
||||
}
|
||||
@@ -2,11 +2,11 @@
|
||||
uniform mat4 projection;
|
||||
uniform mat4 modelview;
|
||||
attribute vec3 pos;
|
||||
attribute vec3 color;
|
||||
varying vec3 color_i;
|
||||
attribute vec2 tex_coord;
|
||||
varying vec2 tex_coord_i;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection * modelview * vec4(pos, 1);
|
||||
color_i = color;
|
||||
tex_coord_i = tex_coord;
|
||||
}
|
||||
Reference in new issue
Block a user