Initial Android commit
This commit is contained in:
		
						commit
						1e2b80c13d
					
				
					 8521 changed files with 231475 additions and 0 deletions
				
			
		
							
								
								
									
										33
									
								
								resources/effects/Kamin.gdshader
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								resources/effects/Kamin.gdshader
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| shader_type canvas_item; | ||||
| 
 | ||||
| uniform sampler2D noise_tex; | ||||
| uniform sampler2D gradient_tex; | ||||
| 
 | ||||
| uniform vec4 brighter_color : hint_color = vec4(1.0, 0.8, 0.0, 1.0); | ||||
| uniform vec4 middle_color : hint_color  = vec4(1.0, 0.56, 0.0, 1.0); | ||||
| uniform vec4 darker_color : hint_color  = vec4(0.64, 0.2, 0.05, 1.0); | ||||
| 
 | ||||
| uniform float spread : hint_range(0.0, 1.0) = 0.5; | ||||
| uniform float transparency : hint_range(0.0,1.0) = 0.5; | ||||
| uniform float speed : hint_range(0.0,5.0) = 0.5; | ||||
| 
 | ||||
| void fragment() | ||||
| { | ||||
| 	 | ||||
| 	float noise_value = texture(noise_tex, UV + vec2(0.0, TIME*speed)).x; | ||||
| 	// The .yx swizzle is when using the built in horizontal gradient texture. If you have a vertical gradient texture remove .yx | ||||
| 	float gradient_value = texture(gradient_tex, UV.yx).x; | ||||
| 	 | ||||
| 	gradient_value -= smoothstep(spread, spread + 0.5, length(UV + vec2(-0.5, -0.5)) / spread); | ||||
| 	 | ||||
| 	float step1 = step(noise_value, gradient_value); | ||||
| 	float step2 = step(noise_value, gradient_value - 0.2); | ||||
| 	float step3 = step(noise_value, gradient_value - 0.4); | ||||
| 	 | ||||
| 	vec3 bd_color = mix(brighter_color.rgb, darker_color.rgb, step1 - step2); | ||||
| 	 | ||||
| 	vec4 color = vec4(bd_color, step1); | ||||
| 	color.rgb = mix(color.rgb, middle_color.rgb, step2 - step3); | ||||
| 	color.a=color.a*transparency; | ||||
| 	COLOR = color; | ||||
| } | ||||
							
								
								
									
										11
									
								
								resources/effects/MovingBackground.gdshader
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								resources/effects/MovingBackground.gdshader
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| shader_type canvas_item; | ||||
| 
 | ||||
| uniform vec2 direction = vec2(1.0,0.0); | ||||
| uniform float speed_scale = 0.1; | ||||
| 
 | ||||
| void fragment(){ | ||||
| 
 | ||||
|      vec2 move = direction * TIME * speed_scale; | ||||
| 
 | ||||
|      COLOR = texture(TEXTURE, UV + move);    | ||||
| } | ||||
							
								
								
									
										69
									
								
								resources/effects/OutlineWithBlackInside.gdshader
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								resources/effects/OutlineWithBlackInside.gdshader
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,69 @@ | |||
| shader_type canvas_item; | ||||
| 
 | ||||
| uniform vec4 color : hint_color = vec4(1.0); | ||||
| uniform float width : hint_range(0, 10) = 1.0; | ||||
| uniform int pattern : hint_range(0, 2) = 0; // diamond, circle, square | ||||
| uniform bool inside = false; | ||||
| uniform bool add_margins = true; // only useful when inside is false | ||||
| uniform bool whiteInside = true; | ||||
| 
 | ||||
| void vertex() { | ||||
| 	if (add_margins) { | ||||
| 		VERTEX += (UV * 2.0 - 1.0) * width; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| bool hasContraryNeighbour(vec2 uv, vec2 texture_pixel_size, sampler2D texture) { | ||||
| 	for (float i = -ceil(width); i <= ceil(width); i++) { | ||||
| 		float x = abs(i) > width ? width * sign(i) : i; | ||||
| 		float offset; | ||||
| 		 | ||||
| 		if (pattern == 0) { | ||||
| 			offset = width - abs(x); | ||||
| 		} else if (pattern == 1) { | ||||
| 			offset = floor(sqrt(pow(width + 0.5, 2) - x * x)); | ||||
| 		} else if (pattern == 2) { | ||||
| 			offset = width; | ||||
| 		} | ||||
| 		 | ||||
| 		for (float j = -ceil(offset); j <= ceil(offset); j++) { | ||||
| 			float y = abs(j) > offset ? offset * sign(j) : j; | ||||
| 			vec2 xy = uv + texture_pixel_size * vec2(x, y); | ||||
| 			 | ||||
| 			if ((xy != clamp(xy, vec2(0.0), vec2(1.0)) || texture(texture, xy).a == 0.0) == inside) { | ||||
| 				return true; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| void fragment() { | ||||
| 	vec2 uv = UV; | ||||
| 	 | ||||
| 	if (add_margins) { | ||||
| 		vec2 texture_pixel_size = vec2(1.0) / (vec2(1.0) / TEXTURE_PIXEL_SIZE + vec2(width * 2.0)); | ||||
| 		 | ||||
| 		uv = (uv - texture_pixel_size * width) * TEXTURE_PIXEL_SIZE / texture_pixel_size; | ||||
| 		 | ||||
| 		if (uv != clamp(uv, vec2(0.0), vec2(1.0))) { | ||||
| 			COLOR.a = 0.0; | ||||
| 		} else { | ||||
| 			COLOR = texture(TEXTURE, uv); | ||||
| 			if (whiteInside) { | ||||
| 				COLOR.rgb=vec3(1.0,1.0,1.0); | ||||
| 			} | ||||
| 			else { | ||||
| 				COLOR.rgb=vec3(0.0,0.0,0.0) | ||||
| 			} | ||||
| 		} | ||||
| 	} else { | ||||
| 		COLOR = texture(TEXTURE, uv); | ||||
| 	} | ||||
| 	 | ||||
| 	if ((COLOR.a > 0.0) == inside && hasContraryNeighbour(uv, TEXTURE_PIXEL_SIZE, TEXTURE)) { | ||||
| 		COLOR.rgb = inside ? mix(COLOR.rgb, color.rgb, color.a) : color.rgb; | ||||
| 		COLOR.a += (1.0 - COLOR.a) * color.a; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										8
									
								
								resources/effects/blur.gdshader
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								resources/effects/blur.gdshader
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| shader_type canvas_item; | ||||
| 
 | ||||
| uniform float blur_amount = 0; | ||||
| 
 | ||||
| void fragment() { | ||||
| 	COLOR.rgb = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount).rgb; | ||||
| 	//COLOR = vec4(1,0,0,1); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue