fixed that weird mesh seam bug
This commit is contained in:
@@ -88,30 +88,30 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.39813, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="baby_eyedog/Armature" index="0"]
|
||||
bones/1/rotation = Quaternion(-0.511974, 0.0877357, 0.0585473, 0.852501)
|
||||
bones/3/rotation = Quaternion(0.205478, 0.0638658, 0.760554, 0.612583)
|
||||
bones/4/rotation = Quaternion(0.180197, 0.674315, 0.227389, 0.67906)
|
||||
bones/5/rotation = Quaternion(0.219411, 0.0676687, 0.265248, 0.936442)
|
||||
bones/6/rotation = Quaternion(0.357553, 0.0231832, 0.0724564, 0.930789)
|
||||
bones/7/rotation = Quaternion(0.181041, -0.117802, -0.730943, 0.647355)
|
||||
bones/8/rotation = Quaternion(0.233133, -0.689549, -0.187324, 0.659607)
|
||||
bones/9/rotation = Quaternion(0.274914, -0.0648911, -0.304984, 0.909503)
|
||||
bones/10/rotation = Quaternion(0.381465, -0.0179444, -0.0905277, 0.919765)
|
||||
bones/11/position = Vector3(-0.125201, 0.0850381, 0.00341609)
|
||||
bones/13/rotation = Quaternion(-0.287812, -0.240553, 0.773797, 0.510428)
|
||||
bones/14/rotation = Quaternion(-0.235014, -0.561232, -0.113218, 0.785474)
|
||||
bones/15/rotation = Quaternion(0.443157, -0.0165556, 0.3712, 0.815811)
|
||||
bones/16/rotation = Quaternion(0.407896, 0.0131239, 0.109742, 0.906314)
|
||||
bones/17/rotation = Quaternion(-0.208372, 0.320971, -0.692574, 0.611474)
|
||||
bones/18/rotation = Quaternion(-0.295573, 0.573472, 0.215253, 0.733098)
|
||||
bones/19/rotation = Quaternion(0.3789, 0.0293754, -0.343993, 0.858627)
|
||||
bones/20/rotation = Quaternion(0.392383, -0.0149631, -0.101692, 0.914041)
|
||||
bones/21/rotation = Quaternion(0.397177, -1.084e-07, -4.91965e-08, 0.917742)
|
||||
bones/22/position = Vector3(-0.234358, 0.0193642, 0.253277)
|
||||
bones/1/rotation = Quaternion(-0.468485, 0.0340623, 0.0227304, 0.882522)
|
||||
bones/3/rotation = Quaternion(0.205937, 0.0447436, 0.771376, 0.600473)
|
||||
bones/4/rotation = Quaternion(0.167593, 0.670881, 0.232675, 0.683881)
|
||||
bones/5/rotation = Quaternion(0.217808, 0.0665955, 0.266024, 0.936673)
|
||||
bones/6/rotation = Quaternion(0.360843, 0.0230075, 0.073477, 0.929443)
|
||||
bones/7/rotation = Quaternion(0.211303, -0.233647, -0.637125, 0.703443)
|
||||
bones/8/rotation = Quaternion(0.224122, -0.711587, -0.156808, 0.647166)
|
||||
bones/9/rotation = Quaternion(0.174333, -0.0933503, -0.20701, 0.958144)
|
||||
bones/10/rotation = Quaternion(0.284589, -0.0334567, -0.0330428, 0.957496)
|
||||
bones/11/position = Vector3(-0.100312, 0.0420758, 0.0808084)
|
||||
bones/13/rotation = Quaternion(-0.360764, -0.237006, 0.795331, 0.425589)
|
||||
bones/14/rotation = Quaternion(-0.196576, -0.553293, -0.0681959, 0.806581)
|
||||
bones/15/rotation = Quaternion(0.304636, 0.00165328, 0.265013, 0.914856)
|
||||
bones/16/rotation = Quaternion(0.30728, 0.0270259, 0.0530331, 0.949756)
|
||||
bones/17/rotation = Quaternion(-0.196513, 0.334849, -0.676991, 0.625253)
|
||||
bones/18/rotation = Quaternion(-0.308738, 0.575292, 0.22907, 0.721974)
|
||||
bones/19/rotation = Quaternion(0.374191, 0.0339708, -0.346235, 0.859621)
|
||||
bones/20/rotation = Quaternion(0.393702, -0.0142134, -0.103737, 0.913255)
|
||||
bones/21/rotation = Quaternion(0.430517, -1.05207e-07, -5.57264e-08, 0.902582)
|
||||
bones/22/position = Vector3(-0.247591, 0.0214787, 0.221024)
|
||||
bones/22/scale = Vector3(0.893472, 1, 1)
|
||||
bones/23/position = Vector3(0.175382, 0.0791651, 0.387213)
|
||||
bones/23/position = Vector3(0.146719, 0.0404748, 0.468044)
|
||||
bones/23/scale = Vector3(0.893472, 1, 1)
|
||||
bones/24/position = Vector3(0.189246, 0.0193879, -0.23164)
|
||||
bones/24/position = Vector3(0.184922, 0.0228077, -0.271657)
|
||||
|
||||
[node name="AnimationPlayer" parent="baby_eyedog" index="1"]
|
||||
autoplay = "Walk"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://bm7wkdbbvgscq"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_0addr"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_0addr"]
|
||||
[ext_resource type="Texture2D" uid="uid://rjijctm2a70f" path="res://Enemies/BabyEyeDog/baby_eyedog_tex.png" id="2_4kam3"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_0addr")
|
||||
shader_parameter/albedo = ExtResource("2_4kam3")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://dylmoyx1tasat"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_4cwdh"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_13w0y"]
|
||||
[ext_resource type="Texture2D" uid="uid://d01y8kogfuayr" path="res://Enemies/Crystalisk/crystal_enemy.png" id="2_l5awy"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_4cwdh")
|
||||
shader_parameter/affine_mapping = true
|
||||
shader = ExtResource("1_13w0y")
|
||||
shader_parameter/albedo = ExtResource("2_l5awy")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
shader_parameter/jitter = 0.25
|
||||
shader_parameter/resolution = Vector2i(320, 240)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://gyrbycd3icjr"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_x1doh"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_x1doh"]
|
||||
[ext_resource type="Texture2D" uid="uid://bd1hlqvfpaxy0" path="res://Enemies/ElderEyeDog/elder_eyedog_tex.png" id="2_jh2nf"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_x1doh")
|
||||
shader_parameter/albedo = ExtResource("2_jh2nf")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://bo82o88d7vo1x"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_crvh7"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_1d6vt"]
|
||||
[ext_resource type="Texture2D" uid="uid://br44qpy5v6ymr" path="res://Enemies/EyeDog/eye_dog_tex.png" id="2_1d6vt"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_crvh7")
|
||||
shader = ExtResource("1_1d6vt")
|
||||
shader_parameter/albedo = ExtResource("2_1d6vt")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
|
||||
@@ -45,8 +45,6 @@ func exit_state() -> void:
|
||||
#hero.hud.secondary_duration.visible = true
|
||||
if hero.game_manager.card_gameplay:
|
||||
hero.hud.energy_label.visible = true
|
||||
var tween: Tween = create_tween()
|
||||
tween.tween_property(hero.right_hand, "position", Vector3(0.17, -0.085, -0.195), 0.5)
|
||||
|
||||
|
||||
func process_state(_delta: float) -> void:
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://ckl5tw5rmewhp" path="res://left_hand/card_hand_model.glb" id="11_h82f6"]
|
||||
[ext_resource type="Script" uid="uid://ckkioruqgbs8p" path="res://Scripts/minimap_cam.gd" id="12_3hpi3"]
|
||||
[ext_resource type="PackedScene" uid="uid://clgbmveluyewe" path="res://card_hand.glb" id="12_r2yb6"]
|
||||
[ext_resource type="PackedScene" uid="uid://4g0vatb73duj" path="res://cassette.glb" id="13_7immr"]
|
||||
[ext_resource type="PackedScene" uid="uid://4g0vatb73duj" path="res://Scenes/Cassette/cassette.glb" id="13_7immr"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6iego7256jf2" path="res://Assets/Textures/wavecounter.png" id="14_l34nu"]
|
||||
[ext_resource type="PackedScene" uid="uid://24x18qxqhy0i" path="res://Scenes/UI/lives_bar.tscn" id="15_cqpib"]
|
||||
[ext_resource type="Texture2D" uid="uid://c60fh34ttgcvh" path="res://Assets/Textures/minimap_player.png" id="15_nhlam"]
|
||||
@@ -77,7 +77,7 @@ animation = &"point"
|
||||
[sub_resource type="AnimationNodeBlend3" id="AnimationNodeBlend3_o55s8"]
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_hueaw"]
|
||||
graph_offset = Vector2(-524.007, 53.6952)
|
||||
graph_offset = Vector2(-378.649, 125.099)
|
||||
nodes/Animation/node = SubResource("AnimationNodeAnimation_r2yb6")
|
||||
nodes/Animation/position = Vector2(-80, 120)
|
||||
"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_o55s8")
|
||||
@@ -206,7 +206,7 @@ swap_off_audio = NodePath("SwapOffAudio")
|
||||
swap_on_audio = NodePath("SwapOnAudio")
|
||||
anim_tree = NodePath("FirstPersonViewport/Head2/RightHand/AnimationTree")
|
||||
anim_tree2 = NodePath("FirstPersonViewport/Head2/RightHand/AnimationTree2")
|
||||
weapon_pivot = NodePath("FirstPersonViewport/Head2/RightHand/gauntlet/Empty")
|
||||
weapon_pivot = NodePath("FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D/Node3D")
|
||||
cassette = NodePath("FirstPersonViewport/Head2/RightHand/card_hand/Empty_001")
|
||||
left_hand_model = NodePath("FirstPersonViewport/Head2/RightHand/card_hand")
|
||||
gauntlet_model = NodePath("FirstPersonViewport/Head2/RightHand/gauntlet")
|
||||
@@ -268,7 +268,7 @@ weapon_rotation_amount = 0.15
|
||||
|
||||
[node name="gauntlet" parent="FirstPersonViewport/Head2/RightHand" instance=ExtResource("11_h1yfy")]
|
||||
|
||||
[node name="Skeleton3D" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Armature_001" index="0"]
|
||||
[node name="Skeleton3D" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet" index="0"]
|
||||
bones/0/position = Vector3(0.312927, -0.266864, 0.177738)
|
||||
bones/0/rotation = Quaternion(-0.495006, -0.501483, 0.498508, 0.50495)
|
||||
bones/4/rotation = Quaternion(0.105534, 0.106025, 0.700766, 0.69753)
|
||||
@@ -286,49 +286,52 @@ bones/17/rotation = Quaternion(0.418178, 0.00746158, 0.0162049, 0.90819)
|
||||
bones/18/rotation = Quaternion(0.614034, -0.337092, -0.360224, 0.616091)
|
||||
bones/19/rotation = Quaternion(0.00975128, -0.00888963, 0.673639, 0.738943)
|
||||
|
||||
[node name="Cube" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Armature_001/Skeleton3D" index="0"]
|
||||
[node name="Cube" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="0"]
|
||||
layers = 2
|
||||
|
||||
[node name="door" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Armature_001/Skeleton3D" index="1"]
|
||||
[node name="door" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="1"]
|
||||
layers = 2
|
||||
|
||||
[node name="door_001" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Armature_001/Skeleton3D" index="2"]
|
||||
[node name="door_001" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="2"]
|
||||
layers = 2
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="3"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.257481, -0.237301, -0.452066)
|
||||
|
||||
[node name="card_hand" parent="FirstPersonViewport/Head2/RightHand" instance=ExtResource("12_r2yb6")]
|
||||
|
||||
[node name="Skeleton3D" parent="FirstPersonViewport/Head2/RightHand/card_hand/Armature" index="0"]
|
||||
bones/0/position = Vector3(0.00370948, 0.144461, 0.0423932)
|
||||
bones/0/rotation = Quaternion(-0.0391611, -0.00947923, 0.737992, 0.673606)
|
||||
bones/0/position = Vector3(0.203673, 0.146968, -0.426731)
|
||||
bones/0/rotation = Quaternion(-0.295355, -0.174661, 0.675005, 0.653167)
|
||||
bones/1/rotation = Quaternion(0.0338271, 0.0201532, -0.0371976, 0.998532)
|
||||
bones/2/rotation = Quaternion(0.460072, -0.11526, -0.0853452, 0.876222)
|
||||
bones/3/rotation = Quaternion(-0.571883, 0.00151041, -0.0240652, 0.819981)
|
||||
bones/4/rotation = Quaternion(-0.00496447, 0.00126425, -0.00114584, 0.999986)
|
||||
bones/5/rotation = Quaternion(0.00475987, 8.9174e-05, 0.00118572, 0.999988)
|
||||
bones/3/rotation = Quaternion(-0.571884, 0.00151028, -0.0240655, 0.81998)
|
||||
bones/4/rotation = Quaternion(-0.00496447, 0.00126426, -0.00114587, 0.999986)
|
||||
bones/5/rotation = Quaternion(0.00475998, 8.91864e-05, 0.00118569, 0.999988)
|
||||
bones/6/rotation = Quaternion(0.13855, -0.0722045, -0.110921, 0.981472)
|
||||
bones/7/rotation = Quaternion(-0.222755, 0.00347345, -0.0158867, 0.974739)
|
||||
bones/8/rotation = Quaternion(-0.00540255, 0.000807132, -0.00116538, 0.999984)
|
||||
bones/9/rotation = Quaternion(0.00470942, -3.6807e-05, 0.00099874, 0.999988)
|
||||
bones/10/rotation = Quaternion(-0.263079, -0.00749409, -0.127804, 0.956242)
|
||||
bones/11/rotation = Quaternion(0.2204, 0.00166266, -0.0429505, 0.974462)
|
||||
bones/12/rotation = Quaternion(-0.00394014, 0.000219108, -0.00391899, 0.999985)
|
||||
bones/13/rotation = Quaternion(0.00445528, -3.48858e-06, 0.00258535, 0.999987)
|
||||
bones/7/rotation = Quaternion(-0.222755, 0.00347346, -0.0158867, 0.974739)
|
||||
bones/8/rotation = Quaternion(-0.00540253, 0.000807137, -0.00116542, 0.999984)
|
||||
bones/9/rotation = Quaternion(0.00470939, -3.68037e-05, 0.000998744, 0.999988)
|
||||
bones/10/rotation = Quaternion(-0.263079, -0.00749408, -0.127804, 0.956242)
|
||||
bones/11/rotation = Quaternion(0.2204, 0.00166271, -0.0429508, 0.974462)
|
||||
bones/12/rotation = Quaternion(-0.00394014, 0.000219103, -0.00391902, 0.999985)
|
||||
bones/13/rotation = Quaternion(0.0044553, -3.50043e-06, 0.00258535, 0.999987)
|
||||
bones/14/rotation = Quaternion(-0.554344, 0.0420024, -0.132671, 0.820571)
|
||||
bones/15/rotation = Quaternion(0.584753, 0.0282596, -0.0690429, 0.807774)
|
||||
bones/16/rotation = Quaternion(0.00422172, -0.0013603, -0.00748737, 0.999962)
|
||||
bones/17/rotation = Quaternion(-0.00197008, -0.000141479, 0.00416674, 0.999989)
|
||||
bones/15/rotation = Quaternion(0.584753, 0.0282597, -0.0690431, 0.807774)
|
||||
bones/16/rotation = Quaternion(0.00422172, -0.00136029, -0.00748738, 0.999962)
|
||||
bones/17/rotation = Quaternion(-0.00197006, -0.000141492, 0.00416676, 0.999989)
|
||||
bones/18/rotation = Quaternion(0.298165, 0.120246, -0.229269, 0.918735)
|
||||
bones/19/rotation = Quaternion(-0.619662, -0.00187954, -0.0190912, 0.784634)
|
||||
bones/20/position = Vector3(-2.12271, 0.354092, -0.125472)
|
||||
bones/20/rotation = Quaternion(0.267825, 0.267825, 0.654423, 0.654423)
|
||||
bones/21/position = Vector3(-3.18228, 0.391216, 0.0190402)
|
||||
bones/21/rotation = Quaternion(0.090506, 0.0905062, 0.701291, 0.701291)
|
||||
bones/22/position = Vector3(-3.29985, 0.391216, -0.162901)
|
||||
bones/22/rotation = Quaternion(-0.00675297, -0.00675283, 0.707075, 0.707075)
|
||||
bones/23/position = Vector3(-3.07121, 0.391216, -0.296884)
|
||||
bones/23/rotation = Quaternion(-0.0448905, -0.0448907, 0.70568, 0.70568)
|
||||
bones/24/position = Vector3(-2.8037, 0.391216, -0.415596)
|
||||
bones/24/rotation = Quaternion(-0.084565, -0.0845652, 0.702032, 0.702032)
|
||||
bones/19/rotation = Quaternion(-0.619662, -0.00187953, -0.0190912, 0.784635)
|
||||
bones/20/position = Vector3(-1.41786, 0.365399, -1.81118)
|
||||
bones/20/rotation = Quaternion(0.0294555, 0.0835587, 0.674858, 0.73261)
|
||||
bones/21/position = Vector3(-2.36191, 0.432636, -2.31039)
|
||||
bones/21/rotation = Quaternion(-0.159954, -0.0928176, 0.673647, 0.715542)
|
||||
bones/22/position = Vector3(-2.3533, 0.414044, -2.52603)
|
||||
bones/22/rotation = Quaternion(-0.256794, -0.184536, 0.654493, 0.686762)
|
||||
bones/23/position = Vector3(-2.08997, 0.396093, -2.50237)
|
||||
bones/23/rotation = Quaternion(-0.293472, -0.219578, 0.643584, 0.671907)
|
||||
bones/24/position = Vector3(-1.80371, 0.379311, -2.44381)
|
||||
bones/24/rotation = Quaternion(-0.33085, -0.255478, 0.630195, 0.654311)
|
||||
|
||||
[node name="Body_004" parent="FirstPersonViewport/Head2/RightHand/card_hand/Armature/Skeleton3D" index="0"]
|
||||
layers = 2
|
||||
|
||||
@@ -90,7 +90,6 @@ func _process(delta: float) -> void:
|
||||
|
||||
func hfov_to_vfov(hfov_degrees: float) -> void:
|
||||
return rad_to_deg(2.0 * atan(tan(deg_to_rad(hfov_degrees) / 2.0) * 9.0 / 16.0))
|
||||
46.8264
|
||||
|
||||
|
||||
func minecraft_translation(amplitude: float) -> Vector3:
|
||||
|
||||
143
Shaders/acerola.gdshader
Normal file
143
Shaders/acerola.gdshader
Normal file
@@ -0,0 +1,143 @@
|
||||
shader_type spatial;
|
||||
render_mode skip_vertex_transform;
|
||||
|
||||
uniform bool billboard = false;
|
||||
|
||||
uniform sampler2D color_texture : source_color, filter_nearest, repeat_disable;
|
||||
|
||||
uniform vec3 tint : source_color = vec3(1);
|
||||
|
||||
uniform bool vertex_snapping = true;
|
||||
uniform bool affine_texture_mapping = true;
|
||||
|
||||
group_uniforms Fog;
|
||||
uniform bool add_fog = false;
|
||||
uniform vec3 fog_color : source_color = vec3(0.42, 0.42, 0.45);
|
||||
uniform vec2 fog_start_end = vec2(10, 100);
|
||||
group_uniforms;
|
||||
|
||||
group_uniforms Light;
|
||||
uniform bool add_dynamic_vertex_lighting = false;
|
||||
uniform vec3 light_direction = vec3(0, 1, 0);
|
||||
uniform float light_intensity = 1.0;
|
||||
uniform vec3 ambient_light : source_color = vec3(0);
|
||||
group_uniforms;
|
||||
|
||||
group_uniforms Dither;
|
||||
uniform bool add_dither = true;
|
||||
uniform float dither_spread = 1.0;
|
||||
uniform float dither_gamma = 1.0;
|
||||
group_uniforms;
|
||||
|
||||
varying vec4 clip_pos;
|
||||
varying float FOG_FACTOR;
|
||||
|
||||
void vertex() {
|
||||
mat4 model_matrix = MODEL_MATRIX;
|
||||
|
||||
if (billboard) {
|
||||
mat4 mat_world = mat4(
|
||||
normalize(INV_VIEW_MATRIX[0]),
|
||||
vec4(0, 1, 0, 0),
|
||||
normalize(INV_VIEW_MATRIX[2]),
|
||||
MODEL_MATRIX[3]);
|
||||
|
||||
model_matrix = mat_world;
|
||||
|
||||
MODELVIEW_MATRIX = VIEW_MATRIX * mat_world;
|
||||
|
||||
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
|
||||
}
|
||||
|
||||
vec4 world_space = model_matrix * vec4(VERTEX, 1);
|
||||
|
||||
vec4 clip = PROJECTION_MATRIX * VIEW_MATRIX * world_space;
|
||||
|
||||
vec4 vertex = clip;
|
||||
|
||||
// Snap to nearest pixel
|
||||
if (vertex_snapping) {
|
||||
vertex.xy = round(clip.xy / clip.w * VIEWPORT_SIZE.xy) / VIEWPORT_SIZE.xy * clip.w;
|
||||
}
|
||||
|
||||
POSITION = vertex;
|
||||
|
||||
// Need to hold on to clip.w to reverse perspective corrections
|
||||
clip_pos = vertex;
|
||||
|
||||
// Calculate vertex distance from camera for fog
|
||||
float view_distance = length(CAMERA_POSITION_WORLD - world_space.xyz);
|
||||
FOG_FACTOR = (fog_start_end.y - (view_distance)) / (fog_start_end.y - fog_start_end.x);
|
||||
FOG_FACTOR = 1.0 - clamp(FOG_FACTOR, 0.0, 1.0);
|
||||
|
||||
|
||||
NORMAL = MODEL_NORMAL_MATRIX * NORMAL;
|
||||
|
||||
if (add_dynamic_vertex_lighting) {
|
||||
float direct_light = clamp(dot(NORMAL, normalize(light_direction)), 0, 1);
|
||||
|
||||
vec3 light = ambient_light + direct_light * light_intensity;
|
||||
COLOR.rgb *= clamp(light, vec3(0), vec3(1));
|
||||
}
|
||||
|
||||
// Multiply by perspective correction to undo it in fragment shader
|
||||
if (affine_texture_mapping) {
|
||||
UV = UV * clip_pos.w;
|
||||
COLOR *= clip_pos.w;
|
||||
FOG_FACTOR *= clip_pos.w;
|
||||
}
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV;
|
||||
vec3 vertex_color = COLOR.rgb;
|
||||
float fog_factor = FOG_FACTOR;
|
||||
|
||||
// Undo perspective correction
|
||||
if (affine_texture_mapping) {
|
||||
uv /= clip_pos.w;
|
||||
vertex_color /= clip_pos.w;
|
||||
fog_factor /= clip_pos.w;
|
||||
}
|
||||
|
||||
vec3 texture_color = texture(color_texture, uv).rgb;
|
||||
|
||||
vec3 albedo = texture_color * vertex_color * tint;
|
||||
|
||||
vec3 fogged = albedo;
|
||||
|
||||
if (add_fog) {
|
||||
fogged = mix(albedo, fog_color, fog_factor);
|
||||
fogged = clamp(fogged, vec3(0), vec3(1));
|
||||
}
|
||||
|
||||
vec3 quantized = fogged;
|
||||
|
||||
if (add_dither) {
|
||||
int ps1_dither_matrix[16] = {
|
||||
-4, 0, -3, 1,
|
||||
2, -2, 3, -1,
|
||||
-3, 1, -4, 0,
|
||||
3, -1, 2, -2
|
||||
};
|
||||
|
||||
// Index 1D dither matrix based on 2D screen coordinates
|
||||
float noise = float(ps1_dither_matrix[(int(FRAGCOORD.x) % 4) + (int(FRAGCOORD.y) % 4) * 4]);
|
||||
|
||||
// Apply dithering and quantize 24 bit srgb to 15 bit srgb according to https://psx-spx.consoledev.net/graphicsprocessingunitgpu/
|
||||
quantized = pow(fogged, vec3(1.0 / dither_gamma)); // Convert to srgb cause it imo looks better and is probably correct idk looks more correct than linear quantization
|
||||
quantized = round(quantized * 255.0 + noise); // Convert to 0-255 and add dither noise
|
||||
quantized = clamp(round(quantized), vec3(0), vec3(255)); // Clamp to 0-255 in case of overflow
|
||||
quantized = clamp(quantized / 8.0, vec3(0), vec3(31)); // Convert to 0-31 range
|
||||
quantized /= 31.0; // Convert back to 0-1 range
|
||||
|
||||
quantized = pow(quantized, vec3(dither_gamma)); // Convert back to linear
|
||||
}
|
||||
|
||||
ALBEDO = quantized;
|
||||
}
|
||||
|
||||
void light() {
|
||||
DIFFUSE_LIGHT = vec3(1);
|
||||
SPECULAR_LIGHT = vec3(0);
|
||||
}
|
||||
1
Shaders/acerola.gdshader.uid
Normal file
1
Shaders/acerola.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bc2aherqyu3na
|
||||
58
Shaders/mightyduke_ps1.gdshader
Normal file
58
Shaders/mightyduke_ps1.gdshader
Normal file
@@ -0,0 +1,58 @@
|
||||
shader_type spatial;
|
||||
render_mode vertex_lighting,
|
||||
skip_vertex_transform,
|
||||
specular_disabled,
|
||||
shadows_disabled,
|
||||
diffuse_lambert_wrap;
|
||||
//render_mode blend_mix,
|
||||
// cull_disabled,
|
||||
// depth_prepass_alpha,
|
||||
// shadows_disabled,
|
||||
// specular_disabled,
|
||||
// vertex_lighting;
|
||||
|
||||
uniform sampler2D albedo: source_color, filter_nearest;
|
||||
|
||||
global uniform float vertex_jitter: hint_range(0.0, 1.0) = 0.5;
|
||||
uniform bool jitter_z_coordinate = true;
|
||||
uniform bool jitter_depth_independent = true;
|
||||
global uniform bool affine_mapping = true;
|
||||
uniform float alpha_scissor: hint_range(0.0, 1.0) = 1.0;
|
||||
|
||||
void vertex() {
|
||||
VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
|
||||
|
||||
float z_orig = VERTEX.z;
|
||||
float i = (1.0 - vertex_jitter) * min(VIEWPORT_SIZE.x, VIEWPORT_SIZE.y) / 2.0;
|
||||
|
||||
vec4 clip = PROJECTION_MATRIX * vec4(VERTEX, 1.0);
|
||||
|
||||
if (jitter_depth_independent) {
|
||||
float w = (PROJECTION_MATRIX * vec4(VERTEX, 1.0)).w;
|
||||
VERTEX = round(VERTEX / w * i) / i * w;
|
||||
} else {
|
||||
VERTEX = round(VERTEX * i) / i;
|
||||
}
|
||||
|
||||
if (!jitter_z_coordinate) {
|
||||
VERTEX.z = z_orig;
|
||||
}
|
||||
POSITION = PROJECTION_MATRIX * vec4(VERTEX, 1.0);
|
||||
if (affine_mapping) {
|
||||
|
||||
POSITION /= abs(POSITION.w);
|
||||
//UV *= VERTEX.z;
|
||||
}
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV;
|
||||
|
||||
//if (affine_texture_mapping) {
|
||||
// uv /= VERTEX.z;
|
||||
//}
|
||||
|
||||
ALBEDO = texture(albedo, uv).rgb;
|
||||
ALPHA = texture(albedo, uv).a;
|
||||
ALPHA_SCISSOR_THRESHOLD = alpha_scissor;
|
||||
}
|
||||
1
Shaders/mightyduke_ps1.gdshader.uid
Normal file
1
Shaders/mightyduke_ps1.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dq04j2s5foo2f
|
||||
Binary file not shown.
@@ -1,10 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://due2j42y7qutw"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_8cr8g"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_mieyr"]
|
||||
[ext_resource type="Texture2D" uid="uid://b54i2pdjv31xi" path="res://Towers/RocketLauncher/box_o_rockets_boxorockets.png" id="2_k3cta"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_8cr8g")
|
||||
shader = ExtResource("1_mieyr")
|
||||
shader_parameter/albedo = ExtResource("2_k3cta")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
|
||||
@@ -29,4 +29,4 @@ max_targets = 3
|
||||
spawn_scene = ExtResource("4_vxjrf")
|
||||
|
||||
[node name="box_o_rockets" parent="." index="7" instance=ExtResource("5_5dmv2")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.907264, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.467609, 0)
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://8yv7excojcg0"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://8yv7excojcg0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ci8vq73u23viy" path="res://UI/Menus/MainMenu/main_menu.gd" id="2_ivytu"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://UI/drop_003.ogg" id="5_cwn2i"]
|
||||
[ext_resource type="Script" uid="uid://ci8vq73u23viy" path="res://Scenes/Menus/MainMenu/main_menu.gd" id="2_ivytu"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://Scenes/UI/drop_003.ogg" id="5_cwn2i"]
|
||||
[ext_resource type="Texture2D" uid="uid://cr1ucbuw3iotp" path="res://Assets/Textures/first_win_achievements.png" id="15_74epv"]
|
||||
[ext_resource type="Script" uid="uid://cjr0pbqisd51v" path="res://UI/Menus/MainMenu/achievements_menu.gd" id="15_sv1gy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpa1hl36xfplg" path="res://Assets/Textures/first_scroll_seen.png" id="16_sv1gy"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctbi3gm1me1t5" path="res://Assets/Textures/unlock_mage_achievement.png" id="17_6t4jd"]
|
||||
[ext_resource type="Script" uid="uid://cxrm2naq75jo1" path="res://Scripts/mod_menu.gd" id="19_6t4jd"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5u75i"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_2jyua"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 1
|
||||
@@ -33,6 +36,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("2_ivytu")
|
||||
bg_level = NodePath("")
|
||||
game_select_menu = NodePath("GameSelectMenu")
|
||||
main_controls = NodePath("MainControls")
|
||||
seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit")
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=36 format=3 uid="uid://y1qa1g3ic8sp"]
|
||||
[gd_scene load_steps=31 format=3 uid="uid://y1qa1g3ic8sp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvejbo3srx8py" path="res://Scripts/level.gd" id="1_ws6nn"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2yv447trxkwt" path="res://Scenes/enemy_spawner.tscn" id="3_5imwp"]
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://deh5dk1wn7n46"
|
||||
path.s3tc="res://.godot/imported/bridge_level_tex.png-285a08b52860b75771157e135c44ca0b.s3tc.ctex"
|
||||
path="res://.godot/imported/bridge_level_tex.png-285a08b52860b75771157e135c44ca0b.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "ba963c984781211fb82f1802a965d534"
|
||||
@@ -15,12 +14,12 @@ generator_parameters={
|
||||
[deps]
|
||||
|
||||
source_file="res://Worlds/GreenPlanet/Levels/Bridge/bridge_level_tex.png"
|
||||
dest_files=["res://.godot/imported/bridge_level_tex.png-285a08b52860b75771157e135c44ca0b.s3tc.ctex"]
|
||||
dest_files=["res://.godot/imported/bridge_level_tex.png-285a08b52860b75771157e135c44ca0b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/mode=0
|
||||
compress/high_quality=true
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://u2y4es6qqkqd"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_icpg6"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_icpg6"]
|
||||
[ext_resource type="Texture2D" uid="uid://deh5dk1wn7n46" path="res://Worlds/GreenPlanet/Levels/Bridge/bridge_level_tex.png" id="2_2g76a"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_icpg6")
|
||||
shader_parameter/albedo = ExtResource("2_2g76a")
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 1.0
|
||||
|
||||
10
Worlds/GreenPlanet/Levels/Bridge/shader2.tres
Normal file
10
Worlds/GreenPlanet/Levels/Bridge/shader2.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://fy4o12thbh6f"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_2suih"]
|
||||
[ext_resource type="Texture2D" uid="uid://deh5dk1wn7n46" path="res://Worlds/GreenPlanet/Levels/Bridge/bridge_level_tex.png" id="2_1bkoy"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_2suih")
|
||||
shader_parameter/albedo = ExtResource("2_1bkoy")
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
@@ -1,10 +1,7 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://5mnnhn5p1tll"]
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://5mnnhn5p1tll"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_38tga"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctjkfe23t6crn" path="res://coin/coin.png" id="2_kttjc"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_38tga")
|
||||
shader_parameter/albedo = ExtResource("2_kttjc")
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
|
||||
BIN
gauntlet.glb
BIN
gauntlet.glb
Binary file not shown.
@@ -32,6 +32,13 @@ animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/path": "uid://b2rsi4vlkfpp1"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
|
||||
BIN
gauntlet_gauntlet_tex.png
Normal file
BIN
gauntlet_gauntlet_tex.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 638 B |
38
gauntlet_gauntlet_tex.png.import
Normal file
38
gauntlet_gauntlet_tex.png.import
Normal file
@@ -0,0 +1,38 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://duleoj3uq56bx"
|
||||
path.s3tc="res://.godot/imported/gauntlet_gauntlet_tex.png-cae4f050d72bb27c1a64aa459990d0ca.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "b5dacbb73c4af204c185f2e11311fec6"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://gauntlet_gauntlet_tex.png"
|
||||
dest_files=["res://.godot/imported/gauntlet_gauntlet_tex.png-cae4f050d72bb27c1a64aa459990d0ca.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
12
gauntlet_mat.tres
Normal file
12
gauntlet_mat.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://b2rsi4vlkfpp1"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_4lvxb"]
|
||||
[ext_resource type="Texture2D" uid="uid://duleoj3uq56bx" path="res://gauntlet_gauntlet_tex.png" id="2_puniw"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_4lvxb")
|
||||
shader_parameter/albedo = ExtResource("2_puniw")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 1.0
|
||||
@@ -1,11 +1,7 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://cmrs1ubeqtl71"]
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://cmrs1ubeqtl71"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_bpyoj"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_6krsv"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_bpyoj")
|
||||
shader_parameter/albedo = SubResource("PlaceholderTexture2D_6krsv")
|
||||
shader_parameter/alpha_scissor = 0.5
|
||||
|
||||
@@ -243,7 +243,7 @@ affine_mapping={
|
||||
"type": "bool",
|
||||
"value": true
|
||||
}
|
||||
jitter_resolution={
|
||||
"type": "ivec2",
|
||||
"value": Vector2i(320, 240)
|
||||
vertex_jitter={
|
||||
"type": "float",
|
||||
"value": 0.5
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user