summaryrefslogtreecommitdiff
path: root/source/Asura.Editor/Graphics/shaders/polygon.shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Asura.Editor/Graphics/shaders/polygon.shader.h')
-rw-r--r--source/Asura.Editor/Graphics/shaders/polygon.shader.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/Asura.Editor/Graphics/shaders/polygon.shader.h b/source/Asura.Editor/Graphics/shaders/polygon.shader.h
new file mode 100644
index 0000000..a92e9a6
--- /dev/null
+++ b/source/Asura.Editor/Graphics/shaders/polygon.shader.h
@@ -0,0 +1,29 @@
+#ifndef _ASURA_EDITOR_SHADER_H_
+#include "../shader.h"
+#endif
+
+//
+static AsuraEditor::Graphics::ShaderProgram polygon_shader =
+{
+ R"(
+in vec2 position;
+
+uniform mat4 mvp_matrix;
+
+void main()
+{
+ gl_Position = mvp_matrix * vec4(position, 0, 1);
+}
+
+)",
+
+R"(
+uniform vec4 color;
+
+void main()
+{
+ gl_FragColor = color;
+}
+
+)"
+}; \ No newline at end of file