added firework on goal and different goal screen (with button to toolshop), but not happy with second one Have to change it in layout file TopBarData has been removed -> All data (DataStorageHandler, TutorialManager, LevelManager, SoundManager, Typeface, User) is stored in the GameActivity and can be recieved by getters Toolshop-tutorial can now be reset and works instantaniously
25 lines
560 B
GLSL
25 lines
560 B
GLSL
precision mediump float;
|
|
|
|
uniform sampler2D texture;
|
|
uniform vec3 color;
|
|
uniform float alpha;
|
|
|
|
varying vec2 pass_TexCoords;
|
|
|
|
vec3 saturateColor(in vec3 color, in float a);
|
|
|
|
void main() {
|
|
|
|
float a = texture2D(texture, pass_TexCoords).a * alpha;
|
|
gl_FragColor = vec4(saturateColor(color, a), a);
|
|
|
|
}
|
|
|
|
vec3 saturateColor(in vec3 color, in float a){
|
|
|
|
float grayscale = (color.r * 0.299 + color.g * 0.587 + color. b * 0.114);
|
|
float alpha = ((1.1 - a) * 0.5) * 40.0;
|
|
|
|
return alpha * color + (1.0 - alpha) * vec3(grayscale, grayscale, grayscale);
|
|
|
|
} |