From 6ae82ad762998dc6d78b4d93096325ba93098a22 Mon Sep 17 00:00:00 2001 From: blobt Date: Sat, 6 Jun 2020 10:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E5=86=99shader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.fs | 5 +++++ test.vs | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 test.fs create mode 100644 test.vs diff --git a/test.fs b/test.fs new file mode 100644 index 0000000..3a2f86e --- /dev/null +++ b/test.fs @@ -0,0 +1,5 @@ +varying vec3 V_Color; + +void main() { + gl_FragColor = V_Color; +} diff --git a/test.vs b/test.vs new file mode 100644 index 0000000..bc79c9e --- /dev/null +++ b/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; +}