summaryrefslogtreecommitdiff
path: root/productviewer
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-08 22:34:51 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-08 22:34:51 +0800
commit9a51b07bb7c5e80fbe1e892d8647f1eb793b6329 (patch)
tree261554d958a76fe2f50f355270ededf956b1a7b2 /productviewer
parentb4232ae8e9ab2e83b8d2b1b7d9fb21f507ed2b64 (diff)
Put shader files in its pkg dirHEADmaster
Diffstat (limited to 'productviewer')
-rw-r--r--productviewer/product.frag7
-rw-r--r--productviewer/product.vert9
2 files changed, 16 insertions, 0 deletions
diff --git a/productviewer/product.frag b/productviewer/product.frag
new file mode 100644
index 0000000..6bbb24d
--- /dev/null
+++ b/productviewer/product.frag
@@ -0,0 +1,7 @@
+precision mediump float;
+varying vec2 v_texcoord;
+uniform sampler2D s_texture;
+void main()
+{
+ gl_FragColor = texture2D(s_texture, v_texcoord);
+}
diff --git a/productviewer/product.vert b/productviewer/product.vert
new file mode 100644
index 0000000..b040d01
--- /dev/null
+++ b/productviewer/product.vert
@@ -0,0 +1,9 @@
+uniform mat4 u_matrix;
+attribute vec4 a_position;
+attribute vec2 a_texcoord;
+varying vec2 v_texcoord;
+void main()
+{
+ gl_Position = u_matrix * a_position;
+ v_texcoord = a_texcoord;
+}