Compare commits
4 Commits
a6dd6b646d
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| fb87ccf301 | |||
| 0d2830d2f2 | |||
| 81ee19796d | |||
| 96e53b9bbe |
Binary file not shown.
|
After Width: | Height: | Size: 787 B |
@@ -0,0 +1,41 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cqgmd4n3v8vpo"
|
||||||
|
path.s3tc="res://.godot/imported/T_Fire.png-a65ff52704eddd060d64040259ba2228.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://models/T_Fire.png"
|
||||||
|
dest_files=["res://.godot/imported/T_Fire.png-a65ff52704eddd060d64040259ba2228.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends Sprite3D
|
||||||
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
animation_player.seek(randf_range(0.,.4))
|
||||||
|
animation_player.speed_scale = randf_range(0.7,1.3)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://btmcmchyhipdy
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
shader_type spatial;
|
||||||
|
render_mode cull_disabled;
|
||||||
|
|
||||||
|
uniform sampler2D tex : source_color, filter_nearest;
|
||||||
|
uniform float intensity = 1;
|
||||||
|
|
||||||
|
void vertex() {
|
||||||
|
// Called for every vertex the material is visible on.
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec4 color = texture(tex,UV);
|
||||||
|
ALBEDO = vec3(0,0,0);
|
||||||
|
EMISSION = color.rgb * intensity;
|
||||||
|
ALPHA = color.a;
|
||||||
|
}
|
||||||
|
|
||||||
|
//void light() {
|
||||||
|
// // Called for every pixel for every light affecting the material.
|
||||||
|
// // Uncomment to replace the default light processing function with this one.
|
||||||
|
//}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bw1w2dsdolhw
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
[gd_scene load_steps=8 format=3 uid="uid://dwd7bdnc82anm"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cqgmd4n3v8vpo" path="res://models/T_Fire.png" id="1_qjpos"]
|
||||||
|
[ext_resource type="Shader" uid="uid://bw1w2dsdolhw" path="res://prefabs/firesprite.gdshader" id="1_xelca"]
|
||||||
|
[ext_resource type="Script" uid="uid://btmcmchyhipdy" path="res://prefabs/firesprite.gd" id="2_ftlo4"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5fcrl"]
|
||||||
|
render_priority = 0
|
||||||
|
shader = ExtResource("1_xelca")
|
||||||
|
shader_parameter/tex = ExtResource("1_qjpos")
|
||||||
|
shader_parameter/intensity = 1.98
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_xelca"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_ftlo4"]
|
||||||
|
resource_name = "fire"
|
||||||
|
length = 0.4015
|
||||||
|
loop_mode = 1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.1, 0.20165114, 0.29820445),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0, 1, 2, 3]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5fcrl"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_xelca"),
|
||||||
|
&"fire": SubResource("Animation_ftlo4")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Firesprite" type="Sprite3D"]
|
||||||
|
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
|
||||||
|
material_override = SubResource("ShaderMaterial_5fcrl")
|
||||||
|
cast_shadow = 0
|
||||||
|
texture_filter = 0
|
||||||
|
texture = ExtResource("1_qjpos")
|
||||||
|
hframes = 4
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(0, 0, 128, 20.214777)
|
||||||
|
script = ExtResource("2_ftlo4")
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_5fcrl")
|
||||||
|
}
|
||||||
|
autoplay = "fire"
|
||||||
@@ -119,6 +119,11 @@ hammering={
|
|||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":121,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":121,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
fire={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends Node3D
|
||||||
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
if event.is_action_pressed("fire"):
|
||||||
|
animation_player.play("full_fire")
|
||||||
|
if event.is_action_pressed("ui_left"):
|
||||||
|
animation_player.play("RESET")
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c5yte0olwvl6g
|
||||||
@@ -5,7 +5,9 @@ uniform int sample_count:hint_range(1, 20) = 1;
|
|||||||
|
|
||||||
uniform float color_steps:hint_range(1.0, 255.0, 1.0);
|
uniform float color_steps:hint_range(1.0, 255.0, 1.0);
|
||||||
uniform sampler2D color_curve;
|
uniform sampler2D color_curve;
|
||||||
|
uniform bool dither = false;
|
||||||
|
|
||||||
|
const mat4 bayer = (mat4(vec4(0,8,2,10),vec4(12,4,14,6),vec4(3,11,1,9),vec4(15,7,13,5)) -8.) / 16.;
|
||||||
|
|
||||||
void vertex() {
|
void vertex() {
|
||||||
// Called for every vertex the material is visible on.
|
// Called for every vertex the material is visible on.
|
||||||
@@ -41,12 +43,20 @@ void fragment() {
|
|||||||
texture(color_curve,vec2(fullColor.g,0)).g,
|
texture(color_curve,vec2(fullColor.g,0)).g,
|
||||||
texture(color_curve,vec2(fullColor.b,0)).b);
|
texture(color_curve,vec2(fullColor.b,0)).b);
|
||||||
vec3 scaledColor = strechedColor * color_steps;
|
vec3 scaledColor = strechedColor * color_steps;
|
||||||
|
|
||||||
|
if(dither){
|
||||||
|
ivec2 bayerIndex = ivec2(int(mod(float(intUv.x),4.)),int(mod(float(intUv.y),4.)));
|
||||||
|
float bayerValue = bayer[bayerIndex.x][bayerIndex.y];
|
||||||
|
scaledColor+=bayerValue;
|
||||||
|
}
|
||||||
|
|
||||||
vec3 roundColor = round(scaledColor);
|
vec3 roundColor = round(scaledColor);
|
||||||
vec3 backScaledColor = roundColor / color_steps;
|
vec3 backScaledColor = roundColor / color_steps;
|
||||||
COLOR = vec4(backScaledColor,1);
|
COLOR = vec4(backScaledColor,1);
|
||||||
//COLOR = vec4(flooredUv,0,1);
|
//COLOR = vec4(flooredUv,0,1);
|
||||||
//COLOR = vec4(vec3(float(textureQueryLevels(TEXTURE)/1)),1);
|
//COLOR = vec4(vec3(float(textureQueryLevels(TEXTURE)/1)),1);
|
||||||
//COLOR = vec4(1,0,0,1);
|
//COLOR = vec4(1,0,0,1);
|
||||||
|
//COLOR = vec4(bayerValue,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void light() {
|
//void light() {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ shader_parameter/target_tex_size = Vector2(427, 240)
|
|||||||
shader_parameter/sample_count = 1
|
shader_parameter/sample_count = 1
|
||||||
shader_parameter/color_steps = 16.0
|
shader_parameter/color_steps = 16.0
|
||||||
shader_parameter/color_curve = SubResource("CurveTexture_5747v")
|
shader_parameter/color_curve = SubResource("CurveTexture_5747v")
|
||||||
|
shader_parameter/dither = false
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_2d5yc"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_2d5yc"]
|
||||||
viewport_path = NodePath("SubViewportContainer/SubViewport")
|
viewport_path = NodePath("SubViewportContainer/SubViewport")
|
||||||
@@ -44,7 +45,7 @@ script = ExtResource("1_xa3mo")
|
|||||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
gui_snap_controls_to_pixels = false
|
gui_snap_controls_to_pixels = false
|
||||||
size = Vector2i(1152, 648)
|
size = Vector2i(1920, 1080)
|
||||||
render_target_update_mode = 4
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="BlockoutRoom" parent="SubViewportContainer/SubViewport" instance=ExtResource("2_w1ssw")]
|
[node name="BlockoutRoom" parent="SubViewportContainer/SubViewport" instance=ExtResource("2_w1ssw")]
|
||||||
|
|||||||
+983
-32
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
|||||||
|
extends MeshInstance3D
|
||||||
|
|
||||||
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||||
|
var isPickedUp:bool = false
|
||||||
|
|
||||||
|
func _on_interactable_on_hit() -> void:
|
||||||
|
isPickedUp = !isPickedUp
|
||||||
|
print("hit")
|
||||||
|
if isPickedUp:
|
||||||
|
animation_player.play("phone_pickzup")
|
||||||
|
else:
|
||||||
|
animation_player.play("Hangup")
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://4301hu7hhhoq
|
||||||
Reference in New Issue
Block a user