diff options
Diffstat (limited to 'Data/Resources/Shaders')
-rw-r--r-- | Data/Resources/Shaders/Editor-Text.glsl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Data/Resources/Shaders/Editor-Text.glsl b/Data/Resources/Shaders/Editor-Text.glsl index e2c2ae7..c58bd48 100644 --- a/Data/Resources/Shaders/Editor-Text.glsl +++ b/Data/Resources/Shaders/Editor-Text.glsl @@ -7,8 +7,7 @@ DepthTest Off CMD_END uniform mat4 gamelab_mat_mvp; -uniform sampler2D uiTex; -uniform vec2 uiText_ST; +uniform sampler2D gamelab_main_tex; VSH_BEGIN layout (location = 0) in vec2 vPos; @@ -16,24 +15,30 @@ layout (location = 1) in vec2 vUV; layout (location = 2) in vec4 vColor; out vec2 uv; +out vec4 color; void main() { - vec4 clip = gamelab_mat_mvp * vec4(vPos, -1, 1.0); + vec2 pos = vPos + vec2(10, 40); + vec4 clip = gamelab_mat_mvp * vec4(pos, -1, 1.0); gl_Position = clip; uv = vUV; + color = vColor; } VSH_END FSH_BEGIN in vec2 uv; +in vec4 color; out vec4 FragColor; void main() { - vec2 uv = vec2(uv.x, 1 - uv.y); - vec4 sampled = vec4(1,1,1,texture(uiTex, uv).r); - FragColor = sampled; + //vec2 uv = vec2(uv.x, 1 - uv.y); + vec4 sampled = vec4(1,1,1,texture(gamelab_main_tex, uv).r); + sampled *= color; + // vec4 sampled = vec4(1,1,1,1); + FragColor = sampled; } FSH_END |