mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 19:28:49 -04:00

fixes #379 Also using separate texture for the selection/pressed state of buttons and checkboxes to allow more artistic freedom.
15 lines
313 B
GLSL
15 lines
313 B
GLSL
#version 330
|
|
|
|
layout (location=0) out vec4 frag_color;
|
|
uniform sampler2D image;
|
|
|
|
flat in vec4 fColor;
|
|
in vec2 startCoord;
|
|
|
|
uniform float scale;
|
|
|
|
void main() {
|
|
frag_color = texture(image, (gl_FragCoord.xy - startCoord)/(2*scale)/textureSize(image, 0));
|
|
frag_color.a *= fColor.a;
|
|
frag_color.rgb += fColor.rgb;
|
|
} |