mirror of
https://github.com/IllusionMan1212/C2048.git
synced 2026-10-24 02:12:31 +00:00
zephr/game: textures, icons, and buttons
- zephr: correctly set cursor when hovering button - zephr: added texture loading and displaying - zephr: added icon button - game: added help and settings icon buttons
This commit is contained in:
+8
-1
@@ -7,6 +7,9 @@ uniform vec4 aColor;
|
||||
uniform float borderRadius;
|
||||
uniform float uiWidth;
|
||||
uniform float uiHeight;
|
||||
uniform bool hasTexture;
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
const float smoothness = 1.0;
|
||||
|
||||
@@ -29,5 +32,9 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
FragColor = vec4(aColor.rgb, alpha);
|
||||
if (hasTexture) {
|
||||
FragColor = texture(tex, v_TexCoords) * vec4(aColor.rgb, alpha);
|
||||
} else {
|
||||
FragColor = vec4(aColor.rgb, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user