diff options
author | chai <chaifix@163.com> | 2021-11-18 19:14:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-18 19:14:35 +0800 |
commit | 2ab7fad7b308debba0aacbf76831569f360d19a0 (patch) | |
tree | a28f4b6ed64ef9782be0f009ca9e458a709e34ca /Data/BuiltIn/Resources/Shaders/Editor-Shape.glsl | |
parent | 6198d0c32b5416b328b55c4c4e5b760c745952c7 (diff) |
*misc
Diffstat (limited to 'Data/BuiltIn/Resources/Shaders/Editor-Shape.glsl')
-rw-r--r-- | Data/BuiltIn/Resources/Shaders/Editor-Shape.glsl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Data/BuiltIn/Resources/Shaders/Editor-Shape.glsl b/Data/BuiltIn/Resources/Shaders/Editor-Shape.glsl new file mode 100644 index 0000000..5ce755f --- /dev/null +++ b/Data/BuiltIn/Resources/Shaders/Editor-Shape.glsl @@ -0,0 +1,34 @@ +#version 330 core +//绘制纯色的几何图形 + +CMD_BEGIN +Cull Off +Blend SrcAlpha OneMinusSrcAlpha +DepthTest Off +CMD_END + +uniform mat4 gamelab_mat_mvp; +uniform sampler2D gamelab_main_tex; +uniform vec2 gamelab_ui_position; +uniform vec4 gamelab_color; + +VSH_BEGIN +layout (location = 0) in vec2 vPos; + +void main() +{ + vec2 pos = vPos + gamelab_ui_position; + vec4 clipPos = gamelab_mat_mvp * vec4(pos, -1, 1.0); + gl_Position = clipPos; +} +VSH_END + +FSH_BEGIN + +out vec4 FragColor; + +void main() +{ + FragColor = gamelab_color; +} +FSH_END |