summaryrefslogtreecommitdiff
path: root/source/Asura.Editor/graphics/shaders/image.shader.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-04-08 22:31:12 +0800
committerchai <chaifix@163.com>2019-04-08 22:31:12 +0800
commit4ea4bbfcb03091cb987dc151d41980ec16f3d18d (patch)
treebdbe56d8c570b5f243744fbfc5a6cdd2c4f6dc4f /source/Asura.Editor/graphics/shaders/image.shader.h
parente47baca4f23db43ec91fbf64d5d06d7c0dbee495 (diff)
*misc
Diffstat (limited to 'source/Asura.Editor/graphics/shaders/image.shader.h')
-rw-r--r--source/Asura.Editor/graphics/shaders/image.shader.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/source/Asura.Editor/graphics/shaders/image.shader.h b/source/Asura.Editor/graphics/shaders/image.shader.h
new file mode 100644
index 0000000..6274f56
--- /dev/null
+++ b/source/Asura.Editor/graphics/shaders/image.shader.h
@@ -0,0 +1,35 @@
+#ifndef __ASURA_EDITOR_SHADER_H__
+#include "../shader.h"
+#endif
+
+//
+static AsuraEditor::Graphics::ShaderProgram image_shader =
+{
+R"(
+in vec2 asura_position;
+in vec2 asura_texcoord0;
+
+uniform mat4 asura_model_matrix;
+uniform mat4 asura_view_matrix;
+uniform mat4 asura_projection_matrix;
+
+void main()
+{
+ gl_Position = asura_projection_matrix * asura_view_matrix * asura_model_matrix * vec4(asura_position, 0, 1);
+ uv = asura_texcoord0;
+}
+
+)",
+
+R"(
+in vec2 uv;
+
+uniform sampler2D img;
+
+void main()
+{
+
+}
+
+)"
+}; \ No newline at end of file