Browse Source

编写shader

master
blobt 4 years ago
parent
commit
6ae82ad762
  1. 5
      test.fs
  2. 12
      test.vs

5
test.fs

@ -0,0 +1,5 @@
varying vec3 V_Color;
void main() {
gl_FragColor = V_Color;
}

12
test.vs

@ -0,0 +1,12 @@
attribute vec3 pos;
attribute vec4 color;
uniform mat4 M;
uniform mat4 V;
uniform mat4 P;
varying V_Color;
void main() {
gl_Position=P*V*M*pos;
}
Loading…
Cancel
Save