Merge branch 'master' of https://git.sjkillen.ca/sjkillen/meat_madness_redux
This commit is contained in:
		
						commit
						2b021e2f43
					
				
					 14 changed files with 366 additions and 61 deletions
				
			
		| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
source_md5="7c7297785e72c853ef99942fb2a995d0"
 | 
			
		||||
dest_md5="92315a7fb8e813c3a546ecd8d2eeb343"
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								godot/assets/audio/sicky_drone_2.ogg
									 (Stored with Git LFS)
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								godot/assets/audio/sicky_drone_2.ogg
									 (Stored with Git LFS)
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										15
									
								
								godot/assets/audio/sicky_drone_2.ogg.import
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								godot/assets/audio/sicky_drone_2.ogg.import
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="ogg_vorbis"
 | 
			
		||||
type="AudioStreamOGGVorbis"
 | 
			
		||||
path="res://.import/sicky_drone_2.ogg-2840f8c9e588a8dc24ba32874f0439b2.oggstr"
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://assets/audio/sicky_drone_2.ogg"
 | 
			
		||||
dest_files=[ "res://.import/sicky_drone_2.ogg-2840f8c9e588a8dc24ba32874f0439b2.oggstr" ]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
loop=false
 | 
			
		||||
loop_offset=0
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
[gd_scene load_steps=27 format=2]
 | 
			
		||||
[gd_scene load_steps=29 format=2]
 | 
			
		||||
 | 
			
		||||
[ext_resource path="res://assets/meat_creek/side_tunnel_1.glb" type="PackedScene" id=1]
 | 
			
		||||
[ext_resource path="res://player/player.tscn" type="PackedScene" id=2]
 | 
			
		||||
| 
						 | 
				
			
			@ -23,6 +23,8 @@
 | 
			
		|||
[ext_resource path="res://assets/models/meat_tentacle_small.tscn" type="PackedScene" id=21]
 | 
			
		||||
[ext_resource path="res://assets/meat_creek/DialogTrigger.gd" type="Script" id=22]
 | 
			
		||||
[ext_resource path="res://assets/meat_creek/DialogTriggerObelisk.gd" type="Script" id=23]
 | 
			
		||||
[ext_resource path="res://assets/meat_bore/npcs/inherited/guy.tscn" type="PackedScene" id=24]
 | 
			
		||||
[ext_resource path="res://assets/meat_bore/dialogue_platform.tscn" type="PackedScene" id=25]
 | 
			
		||||
[ext_resource path="res://assets/models/meat_tentacle.tscn" type="PackedScene" id=400]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Environment" id=3]
 | 
			
		||||
| 
						 | 
				
			
			@ -307,7 +309,7 @@ transform = Transform( -2.49779e-08, 0, -0.571429, 4.44089e-16, 1, 0, 1, -1.7763
 | 
			
		|||
script = ExtResource( 23 )
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape" type="CollisionShape" parent="decorations/obelisk/DialogTrigger" index="0"]
 | 
			
		||||
transform = Transform( 5, 0, 0, 0, 1, 0, 0, 0, 12, 0, 4.79635, 0 )
 | 
			
		||||
transform = Transform( 5, 0, 0, 0, 7.121, 0, 0, 0, 12, 0, 4.79635, 0 )
 | 
			
		||||
shape = SubResource( 5 )
 | 
			
		||||
 | 
			
		||||
[node name="OmniLight" type="OmniLight" parent="decorations/obelisk" index="2"]
 | 
			
		||||
| 
						 | 
				
			
			@ -386,6 +388,13 @@ max_wait = 30.0
 | 
			
		|||
[node name="Timer" type="Timer" parent="AmbientSounds/BottomWhale2" index="0"]
 | 
			
		||||
one_shot = true
 | 
			
		||||
 | 
			
		||||
[node name="guy" parent="." index="15" instance=ExtResource( 24 )]
 | 
			
		||||
transform = Transform( -0.99998, 0, -0.00631814, 0, 1, 0, 0.00631814, 0, -0.99998, -65.889, 1.74389, -97.945 )
 | 
			
		||||
initial_dialogic_timeline = "guy_creek"
 | 
			
		||||
 | 
			
		||||
[node name="dialogue_platform" parent="guy" index="4" instance=ExtResource( 25 )]
 | 
			
		||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -93.1114, 0.735646, -16.5711 )
 | 
			
		||||
 | 
			
		||||
[connection signal="body_entered" from="decorations/obelisk/DialogTrigger" to="decorations/obelisk/DialogTrigger" method="_on_DialogTrigger_body_entered"]
 | 
			
		||||
[connection signal="body_exited" from="decorations/obelisk/DialogTrigger" to="decorations/obelisk/DialogTrigger" method="_on_DialogTrigger_body_exited"]
 | 
			
		||||
[connection signal="body_entered" from="elevator/DialogTrigger" to="elevator/DialogTrigger" method="_on_DialogTrigger_body_entered"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,12 +39,6 @@
 | 
			
		|||
			"type": 0,
 | 
			
		||||
			"value": "false"
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"id": "1672699872-250",
 | 
			
		||||
			"name": "meat_creek_tutorial_given",
 | 
			
		||||
			"type": 0,
 | 
			
		||||
			"value": "false"
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"id": "1672784130-787",
 | 
			
		||||
			"name": "meat_bore_tutorial_given",
 | 
			
		||||
| 
						 | 
				
			
			@ -62,6 +56,12 @@
 | 
			
		|||
			"name": "flashlight_seconds",
 | 
			
		||||
			"type": 0,
 | 
			
		||||
			"value": "0.0"
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"id": "1672699872-250",
 | 
			
		||||
			"name": "meat_creek_tutorial_given",
 | 
			
		||||
			"type": 0,
 | 
			
		||||
			"value": "false"
 | 
			
		||||
		}
 | 
			
		||||
	]
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										22
									
								
								godot/effects/dithering/CanvasLayer.tscn
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								godot/effects/dithering/CanvasLayer.tscn
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
[gd_scene load_steps=3 format=2]
 | 
			
		||||
 | 
			
		||||
[ext_resource path="res://effects/dithering/screen_space_shader.tres" type="Shader" id=1]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id=1]
 | 
			
		||||
shader = ExtResource( 1 )
 | 
			
		||||
shader_param/seed = 81.0
 | 
			
		||||
shader_param/power = 0.0022
 | 
			
		||||
shader_param/speed = 0.1
 | 
			
		||||
shader_param/param = 13.0
 | 
			
		||||
shader_param/scale = 2.0
 | 
			
		||||
shader_param/grid = 4
 | 
			
		||||
shader_param/anim_period = 1.65
 | 
			
		||||
shader_param/amount = 0.06
 | 
			
		||||
shader_param/factor = 200.0
 | 
			
		||||
 | 
			
		||||
[node name="CanvasLayer" type="CanvasLayer"]
 | 
			
		||||
 | 
			
		||||
[node name="ColorRect" type="ColorRect" parent="."]
 | 
			
		||||
material = SubResource( 1 )
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
							
								
								
									
										204
									
								
								godot/effects/dithering/screen_space_shader.tres
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										204
									
								
								godot/effects/dithering/screen_space_shader.tres
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,204 @@
 | 
			
		|||
[gd_resource type="Shader" format=2]
 | 
			
		||||
 | 
			
		||||
[resource]
 | 
			
		||||
code = "shader_type canvas_item;
 | 
			
		||||
 | 
			
		||||
// Color space code from
 | 
			
		||||
// HSV: https://godotshaders.com/shader/hsv-adjustment/
 | 
			
		||||
// LAB/XYZ: https://gist.github.com/msbarry/cd98f928542f5152111a
 | 
			
		||||
// Note: don't use the XYZ space, but sources use it to convert to LAB
 | 
			
		||||
uniform float seed = 81.0;
 | 
			
		||||
uniform float power : hint_range( 0.0, 1.0 ) = 0.0022;
 | 
			
		||||
uniform float speed = 0.1;
 | 
			
		||||
 | 
			
		||||
uniform float param : hint_range(0.0, 255.0, 1.0);
 | 
			
		||||
 | 
			
		||||
vec3 rgb2hsv(vec3 c) {
 | 
			
		||||
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
 | 
			
		||||
    vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
 | 
			
		||||
    vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
 | 
			
		||||
 | 
			
		||||
    float d = q.x - min(q.w, q.y);
 | 
			
		||||
    float e = 1.0e-10;
 | 
			
		||||
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vec3 hsv2rgb(vec3 c) {
 | 
			
		||||
    vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
 | 
			
		||||
    vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
 | 
			
		||||
    return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vec3 rgb2xyz(vec3 c) {
 | 
			
		||||
  float R = ((c.r > 0.04045) ? pow((( c.r + 0.055 ) / 1.055), 2.4) : (c.r / 12.92)) * 100.0;
 | 
			
		||||
  float G = ((c.g > 0.04045) ? pow((( c.g + 0.055 ) / 1.055), 2.4) : (c.g / 12.92)) * 100.0;
 | 
			
		||||
  float B = ((c.b > 0.04045) ? pow((( c.b + 0.055 ) / 1.055), 2.4) : (c.b / 12.92)) * 100.0;
 | 
			
		||||
 | 
			
		||||
  float X = R * 0.4124 + G * 0.3576 + B * 0.1805;
 | 
			
		||||
  float Y = R * 0.2126 + G * 0.7152 + B * 0.0722;
 | 
			
		||||
  float Z = R * 0.0193 + G * 0.1192 + B * 0.9505;
 | 
			
		||||
 | 
			
		||||
  return vec3(X, Y, Z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vec3 xyz2rgb(vec3 c) {
 | 
			
		||||
  float X = c.x / 100.0;
 | 
			
		||||
  float Y = c.y / 100.0;
 | 
			
		||||
  float Z = c.z / 100.0;
 | 
			
		||||
 | 
			
		||||
  float R = X *  3.2406 + Y * -1.5372 + Z * -0.4986;
 | 
			
		||||
  float G = X * -0.9689 + Y *  1.8758 + Z *  0.0415;
 | 
			
		||||
  float B = X *  0.0557 + Y * -0.2040 + Z *  1.0570;
 | 
			
		||||
 | 
			
		||||
  R = ((R > 0.0031308) ? (1.055 * ( pow( R, 1./2.4 ) ) - 0.055) : (12.92 * R)); 
 | 
			
		||||
  G = ((G > 0.0031308) ? (1.055 * ( pow( G, 1./2.4 ) ) - 0.055) : (12.92 * G)); 
 | 
			
		||||
  B = ((B > 0.0031308) ? (1.055 * ( pow( B, 1./2.4 ) ) - 0.055) : (12.92 * B)); 
 | 
			
		||||
 | 
			
		||||
  return vec3(R, G, B);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vec3 xyz2lab(vec3 c) {
 | 
			
		||||
  float X = c.x / 95.047;
 | 
			
		||||
  float Y = c.y / 100.0;
 | 
			
		||||
  float Z = c.z / 108.883;
 | 
			
		||||
 | 
			
		||||
  X = ((X > 0.008856) ? (pow( X, 1./3.)) : (( 7.787 * X ) + ( 16./116.)));
 | 
			
		||||
  Y = ((Y > 0.008856) ? (pow( Y, 1./3.)) : (( 7.787 * Y ) + ( 16./116.)));
 | 
			
		||||
  Z = ((Z > 0.008856) ? (pow( Z, 1./3.)) : (( 7.787 * Z ) + ( 16./116.)));
 | 
			
		||||
 | 
			
		||||
  float L = ( 116. * Y ) - 16.;
 | 
			
		||||
  float a = 500. * ( X - Y );
 | 
			
		||||
  float b = 200. * ( Y - Z );
 | 
			
		||||
 | 
			
		||||
  return vec3(L, a, b);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vec3 lab2xyz(vec3 c) {
 | 
			
		||||
  float L = c.x;
 | 
			
		||||
  float a = c.y;
 | 
			
		||||
  float b = c.z;
 | 
			
		||||
 | 
			
		||||
  float Y = ( L + 16. ) / 116.;
 | 
			
		||||
  float X = a / 500. + Y;
 | 
			
		||||
  float Z = Y - b / 200.;
 | 
			
		||||
 | 
			
		||||
  Y = ((pow(Y,3.) > 0.008856) ? (pow(Y,3.)) : ((Y - 16. / 116.) / 7.787));
 | 
			
		||||
  X = ((pow(X,3.) > 0.008856) ? (pow(X,3.)) : ((X - 16. / 116.) / 7.787));
 | 
			
		||||
  Z = ((pow(Z,3.) > 0.008856) ? (pow(Z,3.)) : ((Z - 16. / 116.) / 7.787));
 | 
			
		||||
 | 
			
		||||
  float ref_X = 95.047;
 | 
			
		||||
  float ref_Y = 100.0;
 | 
			
		||||
  float ref_Z = 108.883;
 | 
			
		||||
 | 
			
		||||
  return vec3(ref_X * X, ref_Y * Y, ref_Z * Z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
vec3 band_colors(vec3 rgb)
 | 
			
		||||
{	
 | 
			
		||||
	return round(rgb * param) / param;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vec3 band_colors_preserve_hue_lum(vec3 rgb)
 | 
			
		||||
{
 | 
			
		||||
	vec3 hsv = rgb2hsv(rgb);
 | 
			
		||||
	hsv.r = round(hsv.r * param) / param;
 | 
			
		||||
	vec3 lab = xyz2lab(rgb2xyz(rgb));
 | 
			
		||||
	lab.r = round(lab.r * (param / 100.0)) / (param / 100.0);
 | 
			
		||||
	
 | 
			
		||||
	// Into HSV
 | 
			
		||||
	vec2 sv = rgb2hsv(xyz2rgb(lab2xyz(lab))).gb;
 | 
			
		||||
	hsv.gb = sv;
 | 
			
		||||
	return hsv2rgb(hsv);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uniform float scale = 2.0;
 | 
			
		||||
uniform int grid = 5;
 | 
			
		||||
 | 
			
		||||
vec3 band_dither(vec3 rgb, vec2 uv)
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
	uv *= (1.0 / scale);
 | 
			
		||||
	int x = int(mod(uv.x, float(grid))) + 1;
 | 
			
		||||
	int y = int(mod(uv.y, float(grid))) + 1;
 | 
			
		||||
	
 | 
			
		||||
	vec3 hsv = rgb2hsv(rgb);
 | 
			
		||||
	
 | 
			
		||||
	int g = int(round(mix(float(grid), float(2), fract(hsv.r * param))));
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	if (x % g == 0 && y % g == 0) {
 | 
			
		||||
		hsv.r = ceil(hsv.r * param) / param;
 | 
			
		||||
	} else {
 | 
			
		||||
		hsv.r = floor(hsv.r * param) / param;		
 | 
			
		||||
	}
 | 
			
		||||
	vec3 lab = xyz2lab(rgb2xyz(rgb));
 | 
			
		||||
	if (x % g == 0 && y % g == 0) {
 | 
			
		||||
		lab.r = ceil(lab.r * (param / 100.0)) / (param / 100.0);
 | 
			
		||||
	} else {
 | 
			
		||||
		lab.r = floor(lab.r * (param / 100.0)) / (param / 100.0);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	// Into HSV
 | 
			
		||||
	vec2 sv = rgb2hsv(xyz2rgb(lab2xyz(lab))).gb;
 | 
			
		||||
	hsv.gb = sv;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	return hsv2rgb(hsv);
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uniform float anim_period : hint_range(0.1, 5, 0.01);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
vec2 random( vec2 pos )
 | 
			
		||||
{ 
 | 
			
		||||
	return fract(
 | 
			
		||||
		sin(
 | 
			
		||||
			vec2(
 | 
			
		||||
				dot(pos, vec2(12.9898,78.233))
 | 
			
		||||
			,	dot(pos, vec2(-148.998,-65.233))
 | 
			
		||||
			)
 | 
			
		||||
		) * 43758.5453
 | 
			
		||||
	);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uniform float amount = 0.060;
 | 
			
		||||
 | 
			
		||||
uniform float factor = 200.0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void fragment()
 | 
			
		||||
{
 | 
			
		||||
	vec2 uv = SCREEN_UV + ( random( UV + vec2( seed - TIME * speed, TIME * speed ) ) - vec2( 0.5, 0.5 ) ) * power;
 | 
			
		||||
	COLOR = textureLod( SCREEN_TEXTURE, uv, 0.0 );
 | 
			
		||||
	
 | 
			
		||||
	vec2 buv = UV;
 | 
			
		||||
	//buv.r = buv.r % 25.0
 | 
			
		||||
	buv.r = round(buv.r * factor) / factor;
 | 
			
		||||
	buv.g = round(buv.g * factor) / factor;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	float a = fract(sin(dot(buv, vec2(12.9898, 78.233) * TIME)) * 438.5453) * 1.9;
 | 
			
		||||
	a = a * amount;
 | 
			
		||||
	
 | 
			
		||||
	COLOR.rgb = band_colors_preserve_hue_lum(COLOR.rgb);
 | 
			
		||||
	//vec3 banded_nostalgia = band_colors(rgb);
 | 
			
		||||
	COLOR.r -= a;
 | 
			
		||||
	COLOR.g -= a;
 | 
			
		||||
	COLOR.b -= a;
 | 
			
		||||
	
 | 
			
		||||
	//float weight = mod(TIME, anim_period) / anim_period;
 | 
			
		||||
	//float double_weight = mod(TIME, anim_period*2.0) / (anim_period*2.0);
 | 
			
		||||
	//weight = double_weight > 0.5 ? (1.-weight) : weight;
 | 
			
		||||
	//vec3 mixed = mix(banded_nostalgia, banded_preserved, weight);
 | 
			
		||||
	//COLOR.rgb = mixed;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
"
 | 
			
		||||
							
								
								
									
										19
									
								
								godot/effects/grainy_shader.gd
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								godot/effects/grainy_shader.gd
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
extends Spatial
 | 
			
		||||
 | 
			
		||||
func madness():
 | 
			
		||||
	$CanvasLayer/ColorRect.visible = false
 | 
			
		||||
	$CanvasLayer/ColorRect2.visible = true
 | 
			
		||||
	$CanvasLayer/ColorRect2/AudioStreamPlayer.play()
 | 
			
		||||
	yield($CanvasLayer/ColorRect2/AudioStreamPlayer, "finished")
 | 
			
		||||
	$CanvasLayer/ColorRect.visible = true
 | 
			
		||||
	$CanvasLayer/ColorRect2.visible = false
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export var frequency = 600
 | 
			
		||||
var seconds = 0.0
 | 
			
		||||
 | 
			
		||||
func _process(delta):
 | 
			
		||||
	seconds += delta
 | 
			
		||||
	if seconds > frequency:
 | 
			
		||||
		seconds = 0
 | 
			
		||||
		madness()
 | 
			
		||||
							
								
								
									
										56
									
								
								godot/effects/grainy_shader.tres
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								godot/effects/grainy_shader.tres
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,56 @@
 | 
			
		|||
[gd_resource type="ShaderMaterial" load_steps=2 format=2]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Shader" id=1]
 | 
			
		||||
code = "/*
 | 
			
		||||
	砂嵐エフェクト by あるる(きのもと 結衣)
 | 
			
		||||
	Screen Noise Effect Shader by Yui Kinomoto @arlez80
 | 
			
		||||
 | 
			
		||||
	MIT License
 | 
			
		||||
*/
 | 
			
		||||
shader_type canvas_item;
 | 
			
		||||
 | 
			
		||||
uniform float seed = 81.0;
 | 
			
		||||
uniform float power : hint_range( 0.0, 1.0 ) = 0.0022;
 | 
			
		||||
uniform float speed = 0.1;
 | 
			
		||||
 | 
			
		||||
vec2 random( vec2 pos )
 | 
			
		||||
{ 
 | 
			
		||||
	return fract(
 | 
			
		||||
		sin(
 | 
			
		||||
			vec2(
 | 
			
		||||
				dot(pos, vec2(12.9898,78.233))
 | 
			
		||||
			,	dot(pos, vec2(-148.998,-65.233))
 | 
			
		||||
			)
 | 
			
		||||
		) * 43758.5453
 | 
			
		||||
	);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uniform float amount = 0.060;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void fragment( )
 | 
			
		||||
{
 | 
			
		||||
	vec2 uv = SCREEN_UV + ( random( UV + vec2( seed - TIME * speed, TIME * speed ) ) - vec2( 0.5, 0.5 ) ) * power;
 | 
			
		||||
	COLOR = textureLod( SCREEN_TEXTURE, uv, 0.0 );
 | 
			
		||||
	
 | 
			
		||||
	vec2 buv = UV;
 | 
			
		||||
	//buv.r = buv.r % 25.0
 | 
			
		||||
	float factor = 200.0;
 | 
			
		||||
	buv.r = round(buv.r * factor) / factor;
 | 
			
		||||
	buv.g = round(buv.g * factor) / factor;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	float a = fract(sin(dot(buv, vec2(12.9898, 78.233) * TIME)) * 438.5453) * 1.9;
 | 
			
		||||
	a = a * amount;
 | 
			
		||||
	COLOR.r -= a;
 | 
			
		||||
	COLOR.g -= a;
 | 
			
		||||
	COLOR.b -= a;
 | 
			
		||||
}"
 | 
			
		||||
 | 
			
		||||
[resource]
 | 
			
		||||
shader = SubResource( 1 )
 | 
			
		||||
shader_param/seed = 81.0
 | 
			
		||||
shader_param/power = 0.0022
 | 
			
		||||
shader_param/speed = 0.1
 | 
			
		||||
shader_param/amount = 0.06
 | 
			
		||||
| 
						 | 
				
			
			@ -1,67 +1,40 @@
 | 
			
		|||
[gd_scene load_steps=3 format=2]
 | 
			
		||||
[gd_scene load_steps=6 format=2]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="Shader" id=1]
 | 
			
		||||
code = "/*
 | 
			
		||||
	砂嵐エフェクト by あるる(きのもと 結衣)
 | 
			
		||||
	Screen Noise Effect Shader by Yui Kinomoto @arlez80
 | 
			
		||||
[ext_resource path="res://effects/dithering/screen_space_shader.tres" type="Shader" id=1]
 | 
			
		||||
[ext_resource path="res://effects/grainy_shader.tres" type="Material" id=2]
 | 
			
		||||
[ext_resource path="res://effects/grainy_shader.gd" type="Script" id=3]
 | 
			
		||||
[ext_resource path="res://assets/audio/sicky_drone_2.ogg" type="AudioStream" id=4]
 | 
			
		||||
 | 
			
		||||
	MIT License
 | 
			
		||||
*/
 | 
			
		||||
shader_type canvas_item;
 | 
			
		||||
 | 
			
		||||
uniform float seed = 81.0;
 | 
			
		||||
uniform float power : hint_range( 0.0, 1.0 ) = 0.0022;
 | 
			
		||||
uniform float speed = 0.1;
 | 
			
		||||
 | 
			
		||||
vec2 random( vec2 pos )
 | 
			
		||||
{ 
 | 
			
		||||
	return fract(
 | 
			
		||||
		sin(
 | 
			
		||||
			vec2(
 | 
			
		||||
				dot(pos, vec2(12.9898,78.233))
 | 
			
		||||
			,	dot(pos, vec2(-148.998,-65.233))
 | 
			
		||||
			)
 | 
			
		||||
		) * 43758.5453
 | 
			
		||||
	);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uniform float amount = 0.060;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void fragment( )
 | 
			
		||||
{
 | 
			
		||||
	vec2 uv = SCREEN_UV + ( random( UV + vec2( seed - TIME * speed, TIME * speed ) ) - vec2( 0.5, 0.5 ) ) * power;
 | 
			
		||||
	COLOR = textureLod( SCREEN_TEXTURE, uv, 0.0 );
 | 
			
		||||
	
 | 
			
		||||
	vec2 buv = UV;
 | 
			
		||||
	//buv.r = buv.r % 25.0
 | 
			
		||||
	float factor = 200.0;
 | 
			
		||||
	buv.r = round(buv.r * factor) / factor;
 | 
			
		||||
	buv.g = round(buv.g * factor) / factor;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	float a = fract(sin(dot(buv, vec2(12.9898, 78.233) * TIME)) * 438.5453) * 1.9;
 | 
			
		||||
	a = a * amount;
 | 
			
		||||
	COLOR.r -= a;
 | 
			
		||||
	COLOR.g -= a;
 | 
			
		||||
	COLOR.b -= a;
 | 
			
		||||
}"
 | 
			
		||||
 | 
			
		||||
[sub_resource type="ShaderMaterial" id=2]
 | 
			
		||||
shader = SubResource( 1 )
 | 
			
		||||
[sub_resource type="ShaderMaterial" id=3]
 | 
			
		||||
shader = ExtResource( 1 )
 | 
			
		||||
shader_param/seed = 81.0
 | 
			
		||||
shader_param/power = 0.0022
 | 
			
		||||
shader_param/speed = 0.1
 | 
			
		||||
shader_param/param = 9.0
 | 
			
		||||
shader_param/scale = 2.0
 | 
			
		||||
shader_param/grid = 4
 | 
			
		||||
shader_param/anim_period = 0.1
 | 
			
		||||
shader_param/amount = 0.06
 | 
			
		||||
shader_param/factor = 500.0
 | 
			
		||||
 | 
			
		||||
[node name="shader" type="Spatial"]
 | 
			
		||||
script = ExtResource( 3 )
 | 
			
		||||
 | 
			
		||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
 | 
			
		||||
layer = 100
 | 
			
		||||
 | 
			
		||||
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
 | 
			
		||||
material = SubResource( 2 )
 | 
			
		||||
material = ExtResource( 2 )
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
mouse_filter = 2
 | 
			
		||||
 | 
			
		||||
[node name="ColorRect2" type="ColorRect" parent="CanvasLayer"]
 | 
			
		||||
visible = false
 | 
			
		||||
material = SubResource( 3 )
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
 | 
			
		||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="CanvasLayer/ColorRect2"]
 | 
			
		||||
stream = ExtResource( 4 )
 | 
			
		||||
volume_db = 15.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -114,7 +114,7 @@ shader_param/normal_map = ExtResource( 2 )
 | 
			
		|||
extents = Vector3( 1.72965, 1.52498, 0.0716956 )
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape" id=4]
 | 
			
		||||
extents = Vector3( 0.415364, 0.271899, 0.607307 )
 | 
			
		||||
extents = Vector3( 1, 1, 1.66041 )
 | 
			
		||||
 | 
			
		||||
[node name="WallStruggler" type="MeshInstance"]
 | 
			
		||||
transform = Transform( 0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 0, 0 )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ tracks/0/keys = {
 | 
			
		|||
"times": PoolRealArray( 0, 0.549, 2.928 ),
 | 
			
		||||
"transitions": PoolRealArray( 1, 1, 1 ),
 | 
			
		||||
"update": 0,
 | 
			
		||||
"values": [ 70.0, 70.0, 110.0 ]
 | 
			
		||||
"values": [ 70.0, 70.0, 130.0 ]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[sub_resource type="CylinderShape" id=4]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,7 @@ func find_blackbox(id: int):
 | 
			
		|||
	if not found_blackboxes[id]:
 | 
			
		||||
		found_blackboxes[id] = true
 | 
			
		||||
		found_blackbox_count += 1
 | 
			
		||||
		Dialogic.set_variable("meat_creek_tutorial_given", true)
 | 
			
		||||
		
 | 
			
		||||
	var dialog
 | 
			
		||||
	if blackbox_dialogues[id] == null or blackbox_dialogues[id].get_ref() == null:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue