diff options
Diffstat (limited to 'Source/Asura.Editor/Graphics/Shaders')
3 files changed, 99 insertions, 0 deletions
diff --git a/Source/Asura.Editor/Graphics/Shaders/GUIClip.shader.h b/Source/Asura.Editor/Graphics/Shaders/GUIClip.shader.h new file mode 100644 index 0000000..cbdd542 --- /dev/null +++ b/Source/Asura.Editor/Graphics/Shaders/GUIClip.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 asura_maintex; + +void main() +{ + +} + +)" +};
\ No newline at end of file diff --git a/Source/Asura.Editor/Graphics/Shaders/GUIText.shader.h b/Source/Asura.Editor/Graphics/Shaders/GUIText.shader.h new file mode 100644 index 0000000..a92e9a6 --- /dev/null +++ b/Source/Asura.Editor/Graphics/Shaders/GUIText.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 diff --git a/Source/Asura.Editor/Graphics/Shaders/GUITexture.shader.h b/Source/Asura.Editor/Graphics/Shaders/GUITexture.shader.h new file mode 100644 index 0000000..cbdd542 --- /dev/null +++ b/Source/Asura.Editor/Graphics/Shaders/GUITexture.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 asura_maintex; + +void main() +{ + +} + +)" +};
\ No newline at end of file |