- add: new tiles and another ui tweaks (#11)
* - fix: audio crash * - tweak: main menu * connect gui * some shaders here * tiles
This commit is contained in:
23
Resources/Textures/Shaders/Ohio/atm.swsl
Normal file
23
Resources/Textures/Shaders/Ohio/atm.swsl
Normal file
@@ -0,0 +1,23 @@
|
||||
uniform sampler2D SCREEN_TEXTURE;
|
||||
|
||||
highp float random(highp float seed){
|
||||
return fract(543.2543 * sin(seed * 3525.46));
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
highp vec2 uv = UV;
|
||||
|
||||
highp float particles = random(TIME * 0.5 + uv.x * uv.y);
|
||||
|
||||
highp vec3 atmosphereColor = vec3(uv.x, uv.y, 0.5);
|
||||
|
||||
highp vec3 finalColor = atmosphereColor * 0.6;
|
||||
|
||||
finalColor += texture(SCREEN_TEXTURE, uv - vec2(0.01, 0.01)).rgb * 0.2;
|
||||
|
||||
finalColor *= vec3(particles);
|
||||
|
||||
finalColor *= vec3(1.0, 1.0, 1.0);
|
||||
|
||||
COLOR = vec4(finalColor, 0.01);
|
||||
}
|
||||
18
Resources/Textures/Shaders/Ohio/grain.swsl
Normal file
18
Resources/Textures/Shaders/Ohio/grain.swsl
Normal file
@@ -0,0 +1,18 @@
|
||||
light_mode unshaded;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE;
|
||||
uniform highp float strength;
|
||||
|
||||
void fragment()
|
||||
{
|
||||
highp vec2 uv = UV;
|
||||
highp vec4 color = texture(SCREEN_TEXTURE, uv);
|
||||
|
||||
highp float x = (uv.x + 4.0 ) * (uv.y + 4.0 ) * (TIME * 10.0);
|
||||
|
||||
highp vec4 grain = vec4(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01) - 0.005) * strength;
|
||||
|
||||
grain = color * (1.0 - grain);
|
||||
|
||||
COLOR = grain;
|
||||
}
|
||||
Reference in New Issue
Block a user