wip: adding provisional scenes
This commit is contained in:
parent
cea1249334
commit
60ab237235
|
|
@ -0,0 +1,286 @@
|
||||||
|
[gd_scene load_steps=25 format=3 uid="uid://de1jhrkfs5qc6"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ds1n0xhxqlp4b" path="res://base-environments/youth_room/shaders/universe_noise.png" id="1_uu85p"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dy5rd437h5hsw" path="res://logic-scenes/board/card.tscn" id="2_wi77g"]
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://j7e7me3hl6xt" path="res://logic-scenes/board/card-textures/card-sprites.tres" id="3_2ph0d"]
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id="Shader_f606e"]
|
||||||
|
code = "shader_type canvas_item;
|
||||||
|
render_mode blend_add;
|
||||||
|
|
||||||
|
uniform float fire_progression = 0;
|
||||||
|
uniform sampler2D flame_noise: repeat_enable;
|
||||||
|
uniform sampler2D flame_gradoent;
|
||||||
|
|
||||||
|
vec3 RNGV3(vec3 p) {
|
||||||
|
vec3 a = fract(sin(vec3(p.x, p.y, p.z)) * vec3(111.11,333.33,444.44));
|
||||||
|
a += dot(a, a+33.51);
|
||||||
|
return fract(vec3(a.x*a.y, a.y*a.z, a.z*a.x)); //outputs a random vec2 between 0 and 1
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 voronoy(vec3 loc, float scale){
|
||||||
|
loc = loc*scale;
|
||||||
|
vec4 output = vec4(0., 0., 0., 10.);
|
||||||
|
for(float y=-1.; y<=1.; y++){
|
||||||
|
for(float x=-1.; x<=1.; x++){
|
||||||
|
for(float z=-1.; z<=1.; z++){
|
||||||
|
vec3 offs = vec3(x,y,z);
|
||||||
|
vec3 n = RNGV3(floor(loc)+offs)*2.0-1.0;
|
||||||
|
vec3 p = offs+sin(n) * .5;
|
||||||
|
float d = length((fract(loc)-0.5)-p);
|
||||||
|
if(d<output.q){
|
||||||
|
vec3 rng = RNGV3(floor(loc)+offs);
|
||||||
|
output = vec4(rng.x, rng.y, rng.z, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 smooth_voronoi(vec3 loc, float scale, int steps, float scatter){
|
||||||
|
vec4 result = vec4(.0);
|
||||||
|
scatter = scatter/float(steps)/scale;
|
||||||
|
|
||||||
|
for (float x = 0.0; x<float(steps); x++) {
|
||||||
|
for (float y = 0.0; y<float(steps); y++) {
|
||||||
|
for (float z = 0.0; z<float(steps); z++) {
|
||||||
|
result += voronoy(loc + vec3(x, y, z) * scatter, scale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result / pow(float(steps), 3.);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec2 flame_uv = UV * 2.0+ texture(flame_noise, UV+vec2(0, TIME*3.0) *.1).z*vec2(0.1, 0.7);
|
||||||
|
flame_uv = UV + pow(smooth_voronoi(vec3(flame_uv + vec2(.0, TIME*2.0) , TIME*1.0), 2.0, 3, .3).w, 1.5-voronoy(vec3(flame_uv, -TIME + COLOR.r*.5)*.7, 5.0).w) - 1.3 - COLOR.r*.5 + fire_progression;
|
||||||
|
|
||||||
|
COLOR = pow(texture(flame_gradoent, flame_uv.yx), vec4(2.2)) * sin((fire_progression)*(PI/2.0)) * pow(COLOR.r, 0.5) *3.0;
|
||||||
|
}"
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_f606e"]
|
||||||
|
interpolation_mode = 2
|
||||||
|
interpolation_color_space = 1
|
||||||
|
offsets = PackedFloat32Array(0.0651558, 0.195467, 0.371105, 0.546742, 1)
|
||||||
|
colors = PackedColorArray(0, 0, 0, 0, 0.58, 0.282267, 0.0696, 0.654902, 1, 0.615686, 0.286275, 1, 0.87, 0.3364, 0.0696, 0.635294, 0, 0, 0, 0)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_5xkf6"]
|
||||||
|
gradient = SubResource("Gradient_f606e")
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5xkf6"]
|
||||||
|
shader = SubResource("Shader_f606e")
|
||||||
|
shader_parameter/fire_progression = 0.415404
|
||||||
|
shader_parameter/flame_noise = ExtResource("1_uu85p")
|
||||||
|
shader_parameter/flame_gradoent = SubResource("GradientTexture1D_5xkf6")
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_uu85p"]
|
||||||
|
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_f606e"]
|
||||||
|
gradient = SubResource("Gradient_uu85p")
|
||||||
|
width = 407
|
||||||
|
height = 315
|
||||||
|
fill = 1
|
||||||
|
fill_from = Vector2(0.499433, 0.470085)
|
||||||
|
fill_to = Vector2(0.23814, 0.858974)
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_2ph0d"]
|
||||||
|
script/source = "@tool
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
var flame_progression: float = 0
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
flame_progression = fmod( flame_progression + delta*.2 , 2.0)
|
||||||
|
material.set_shader_parameter(\"fire_progression\", flame_progression)
|
||||||
|
$AnimatedSprite2D/Sprite2D.material.set_shader_parameter(\"fire_progression\", flame_progression)
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id="Shader_uu85p"]
|
||||||
|
code = "shader_type canvas_item;
|
||||||
|
render_mode blend_mix;
|
||||||
|
|
||||||
|
uniform float fire_progression = 0;
|
||||||
|
uniform sampler2D flame_noise: repeat_enable;
|
||||||
|
uniform sampler2D ash_gradoent: repeat_disable;
|
||||||
|
|
||||||
|
vec3 RNGV3(vec3 p) {
|
||||||
|
vec3 a = fract(sin(vec3(p.x, p.y, p.z)) * vec3(111.11,333.33,444.44));
|
||||||
|
a += dot(a, a+33.51);
|
||||||
|
return fract(vec3(a.x*a.y, a.y*a.z, a.z*a.x)); //outputs a random vec2 between 0 and 1
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 voronoy(vec3 loc, float scale){
|
||||||
|
loc = loc*scale;
|
||||||
|
vec4 output = vec4(0., 0., 0., 10.);
|
||||||
|
for(float y=-1.; y<=1.; y++){
|
||||||
|
for(float x=-1.; x<=1.; x++){
|
||||||
|
for(float z=-1.; z<=1.; z++){
|
||||||
|
vec3 offs = vec3(x,y,z);
|
||||||
|
vec3 n = RNGV3(floor(loc)+offs)*2.0-1.0;
|
||||||
|
vec3 p = offs+sin(n) * .5;
|
||||||
|
float d = length((fract(loc)-0.5)-p);
|
||||||
|
if(d<output.q){
|
||||||
|
vec3 rng = RNGV3(floor(loc)+offs);
|
||||||
|
output = vec4(rng.x, rng.y, rng.z, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 smooth_voronoi(vec3 loc, float scale, int steps, float scatter){
|
||||||
|
vec4 result = vec4(.0);
|
||||||
|
scatter = scatter/float(steps)/scale;
|
||||||
|
|
||||||
|
for (float x = 0.0; x<float(steps); x++) {
|
||||||
|
for (float y = 0.0; y<float(steps); y++) {
|
||||||
|
for (float z = 0.0; z<float(steps); z++) {
|
||||||
|
result += voronoy(loc + vec3(x, y, z) * scatter, scale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result / pow(float(steps), 3.);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
COLOR *= texture(ash_gradoent, vec2(smooth_voronoi(vec3(UV, .0), 4.0, 2, .2).w + COLOR.r*3.0 - pow(fire_progression, 2.2)*3.0 +.5));
|
||||||
|
}"
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_5ktf7"]
|
||||||
|
offsets = PackedFloat32Array(0.243626, 0.29745, 0.844193)
|
||||||
|
colors = PackedColorArray(0.01, 0.0061, 0.004, 1, 0.44, 0.264, 0.11, 0.784314, 1, 1, 1, 0)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_6iarf"]
|
||||||
|
gradient = SubResource("Gradient_5ktf7")
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wi77g"]
|
||||||
|
shader = SubResource("Shader_uu85p")
|
||||||
|
shader_parameter/fire_progression = 0.415404
|
||||||
|
shader_parameter/flame_noise = ExtResource("1_uu85p")
|
||||||
|
shader_parameter/ash_gradoent = SubResource("GradientTexture2D_6iarf")
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_wi77g"]
|
||||||
|
gradient = SubResource("Gradient_uu85p")
|
||||||
|
width = 407
|
||||||
|
height = 300
|
||||||
|
fill = 1
|
||||||
|
fill_from = Vector2(1, 0)
|
||||||
|
fill_to = Vector2(0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id="Shader_cfpbc"]
|
||||||
|
code = "shader_type canvas_item;
|
||||||
|
render_mode blend_add;
|
||||||
|
|
||||||
|
uniform sampler2D heat_gradient;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
float gradient = pow(max(0.0, 1.0-(length(UV-.5)*(3.0-COLOR.r))), 1.5-COLOR.r*1.0);
|
||||||
|
gradient *= mix(1.0, pow(length(UV*vec2(1.7, 1.7)-vec2(0.85, 0.1))*1.5, 4.2), COLOR.r);
|
||||||
|
COLOR = vec4(texture(heat_gradient, vec2(COLOR.b)).xyz, min(gradient, 1.0))*.25 * pow(COLOR.g, 2.2);
|
||||||
|
}"
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_cfpbc"]
|
||||||
|
interpolation_color_space = 1
|
||||||
|
offsets = PackedFloat32Array(0.21813, 0.422096, 1)
|
||||||
|
colors = PackedColorArray(0.117647, 0.345098, 1, 1, 1, 0.333333, 0, 1, 0.98, 0.476933, 0.2254, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_uu85p"]
|
||||||
|
gradient = SubResource("Gradient_cfpbc")
|
||||||
|
use_hdr = true
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_uu85p"]
|
||||||
|
shader = SubResource("Shader_cfpbc")
|
||||||
|
shader_parameter/heat_gradient = SubResource("GradientTexture1D_uu85p")
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_wi77g"]
|
||||||
|
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_2ph0d"]
|
||||||
|
gradient = SubResource("Gradient_wi77g")
|
||||||
|
height = 80
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_2ph0d"]
|
||||||
|
interpolation_mode = 2
|
||||||
|
interpolation_color_space = 1
|
||||||
|
offsets = PackedFloat32Array(0, 0.254593, 0.902887, 1)
|
||||||
|
colors = PackedColorArray(0.6, 0.443137, 0, 1, 1, 0.917647, 0.388235, 1, 0.513726, 0.772549, 0.862745, 1, 0.443137, 0.635294, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_cfpbc"]
|
||||||
|
script/source = "extends CPUParticles2D
|
||||||
|
|
||||||
|
var noise: = FastNoiseLite.new()
|
||||||
|
var noise_position:= 0.0
|
||||||
|
var noise_offset:= Vector2.ZERO
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
var diff: Vector2 = position - noise_offset - get_viewport().get_mouse_position()
|
||||||
|
noise_position += delta * 100
|
||||||
|
noise_offset = Vector2(noise.get_noise_1d(noise_position), noise.get_noise_1d(-noise_position))*30.0
|
||||||
|
position = get_viewport().get_mouse_position() + noise_offset
|
||||||
|
rotation = lerp(rotation, clamp(-PI/3, diff.x *.05, PI/3), delta*20.0)
|
||||||
|
|
||||||
|
lifetime = lerp(lifetime, .25 * (1.0/(1.0+diff.length()*.1) - noise_offset.length()*.02), 0.2)
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id="Environment_cfpbc"]
|
||||||
|
background_mode = 3
|
||||||
|
ambient_light_source = 2
|
||||||
|
tonemap_mode = 2
|
||||||
|
glow_enabled = true
|
||||||
|
glow_intensity = 1.0
|
||||||
|
glow_blend_mode = 1
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
offset_right = 1936.0
|
||||||
|
offset_bottom = 1093.0
|
||||||
|
color = Color(0.170168, 0.163934, 0.303063, 1)
|
||||||
|
|
||||||
|
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
material = SubResource("ShaderMaterial_5xkf6")
|
||||||
|
position = Vector2(840, 622)
|
||||||
|
scale = Vector2(1.54492, 1.69531)
|
||||||
|
texture = SubResource("GradientTexture2D_f606e")
|
||||||
|
script = SubResource("GDScript_2ph0d")
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Sprite2D2"]
|
||||||
|
show_behind_parent = true
|
||||||
|
clip_children = 2
|
||||||
|
position = Vector2(-9.06201, -0.589877)
|
||||||
|
scale = Vector2(0.647283, 0.589863)
|
||||||
|
sprite_frames = ExtResource("3_2ph0d")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="Sprite2D2/AnimatedSprite2D"]
|
||||||
|
material = SubResource("ShaderMaterial_wi77g")
|
||||||
|
position = Vector2(6, -11)
|
||||||
|
scale = Vector2(1.54492, 1.69531)
|
||||||
|
texture = SubResource("GradientTexture2D_wi77g")
|
||||||
|
|
||||||
|
[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
|
||||||
|
material = SubResource("ShaderMaterial_uu85p")
|
||||||
|
position = Vector2(1206, 675)
|
||||||
|
amount = 256
|
||||||
|
texture = SubResource("GradientTexture2D_2ph0d")
|
||||||
|
lifetime = 0.25
|
||||||
|
emission_shape = 1
|
||||||
|
emission_sphere_radius = 5.0
|
||||||
|
particle_flag_align_y = true
|
||||||
|
direction = Vector2(0, -1)
|
||||||
|
spread = 0.0
|
||||||
|
gravity = Vector2(0, 800)
|
||||||
|
initial_velocity_min = 500.0
|
||||||
|
initial_velocity_max = 600.0
|
||||||
|
color_ramp = SubResource("Gradient_2ph0d")
|
||||||
|
script = SubResource("GDScript_cfpbc")
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
|
environment = SubResource("Environment_cfpbc")
|
||||||
|
|
||||||
|
[node name="card" parent="." instance=ExtResource("2_wi77g")]
|
||||||
|
position = Vector2(2447, 467)
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://d13scho6nihoo"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dotekvpr6rytk" path="res://base-environments/transition/import/subway_train.glb" id="1_nha1s"]
|
||||||
|
|
||||||
|
[node name="Node3D" type="Node3D"]
|
||||||
|
|
||||||
|
[node name="subway_train" parent="." instance=ExtResource("1_nha1s")]
|
||||||
Loading…
Reference in New Issue