[gd_scene load_steps=12 format=3 uid="uid://bojbawyoy11i4"] [ext_resource type="Script" path="res://Scripts/Player.gd" id="2_0sf88"] [ext_resource type="Material" uid="uid://cr4ra7ijk1uec" path="res://Assets/Materials/floor.tres" id="2_8fy0v"] [sub_resource type="Shader" id="Shader_gv186"] code = "shader_type spatial; #define USE_ALPHA 0 #define USE_ALPHA_CUTOFF 0 #define USE_EMISSION 0 #define USE_REFLECTIONS 0 #define USE_NORMAL_MAP 0 #define USE_OCCLUSION 0 #define USE_ANISOTROPY 0 #define USE_BACKLIGHT 0 #define USE_REFRACTION 0 #if USE_ALPHA render_mode depth_draw_always; #endif #include \"includes/base-cel-shader.gdshaderinc\" #if USE_EMISSION #include \"includes/emission.gdshaderinc\" #endif #if USE_REFLECTIONS #include \"includes/reflections.gdshaderinc\" #endif #if USE_NORMAL_MAP #include \"includes/normal-map.gdshaderinc\" #endif #if USE_OCCLUSION #include \"includes/occlusion.gdshaderinc\" #endif #if USE_ANISOTROPY #include \"includes/anisotropy.gdshaderinc\" #endif #if USE_BACKLIGHT #include \"includes/backlight.gdshaderinc\" #endif #if USE_REFRACTION #include \"includes/refraction.gdshaderinc\" #elif !USE_REFRACTION && USE_ALPHA #include \"includes/transparency.gdshaderinc\" #endif group_uniforms BaseProperties; #if USE_ALPHA_CUTOFF uniform float alpha_cutoff: hint_range(0.0, 1.0) = 0.5; #endif uniform vec4 color: source_color = vec4(0.7, 0.12, 0.86, 1.0); uniform sampler2D base_texture: source_color; uniform vec4 specular: source_color = vec4(0.3, 0.3, 0.3, 0.5); uniform sampler2D specular_texture: hint_default_white; uniform vec4 fresnel: source_color = vec4(0.2, 0.2, 0.2, 0.3); uniform sampler2D fresnel_texture: hint_default_white; group_uniforms; varying vec3 SPECULAR_COLOR; varying float SPECULAR_STRENGTH; varying vec3 FRESNEL_COLOR; varying float FRESNEL_STRENGTH; group_uniforms Tiling; uniform vec2 uv_scale = vec2(1,1); uniform vec2 uv_offset = vec2(0,0); group_uniforms; void vertex() { UV = UV * uv_scale.xy + uv_offset.xy; } void fragment() { ALBEDO = color.rgb * texture(base_texture, UV).rgb; #if USE_ALPHA float alpha = color.a * texture(base_texture, UV).a; ALBEDO *= alpha; #elif USE_ALPHA_CUTOFF ALPHA = color.a * texture(base_texture, UV).a; ALPHA_SCISSOR_THRESHOLD = color.a * texture(base_texture, UV).a; #endif #if USE_REFRACTION && USE_ALPHA EMISSION += refraction_fragment(alpha, NORMAL, SCREEN_UV, FRAGCOORD.z); #elif !USE_REFRACTION && USE_ALPHA EMISSION += transparency_fragment(alpha, SCREEN_UV); #endif SPECULAR_COLOR = specular.rgb * texture(specular_texture, UV).rgb; SPECULAR_STRENGTH = specular.a * texture(specular_texture, UV).a; FRESNEL_COLOR = fresnel.rgb * texture(fresnel_texture, UV).rgb; FRESNEL_STRENGTH = fresnel.a * texture(fresnel_texture, UV).a; #if USE_EMISSION EMISSION += emission_fragment(UV); #endif #if USE_REFLECTIONS Surface surf = reflections_fragment(UV); METALLIC = surf.metallic; ROUGHNESS = surf.roughness; #endif #if USE_NORMAL_MAP NormalData normal = normal_map_fragment(UV, NORMAL, TANGENT, BINORMAL); NORMAL = normal.vector; NORMAL_MAP = normal.map; NORMAL_MAP_DEPTH = normal.depth; #endif #if USE_OCCLUSION OcclusionData occlusion = occlusion_fragment(UV); AO = occlusion.ao; AO_LIGHT_AFFECT = occlusion.ao_light_affect; #endif #if USE_ANISOTROPY AnisotropyData aniso = anisotropy_fragment(UV); ANISOTROPY_DIR = aniso.direction; ANISOTROPY_RATIO = aniso.ratio; #endif #if USE_BACKLIGHT BACKLIGHT = backlight_fragment(UV); #endif } void light() { #if USE_BACKLIGHT DIFFUSE_LIGHT += backlight_diffuse( ALBEDO, LIGHT_COLOR, LIGHT, NORMAL, ATTENUATION, BACKLIGHT ); #else DIFFUSE_LIGHT += diffuse_light( ALBEDO, LIGHT_COLOR, LIGHT, NORMAL, ATTENUATION ); #endif #if USE_ANISOTROPY SPECULAR_LIGHT += anisotropy_specular( LIGHT_COLOR, SPECULAR_COLOR, SPECULAR_STRENGTH, NORMAL, VIEW, LIGHT, ATTENUATION, UV, ANISOTROPY_DIR, ANISOTROPY_RATIO ); #else SPECULAR_LIGHT += specular_light( LIGHT_COLOR, SPECULAR_COLOR, SPECULAR_STRENGTH, NORMAL, VIEW, LIGHT, ATTENUATION ); #endif SPECULAR_LIGHT += fresnel_light( LIGHT_COLOR, FRESNEL_COLOR, FRESNEL_STRENGTH, NORMAL, VIEW, LIGHT, ATTENUATION ); } " [sub_resource type="ShaderMaterial" id="ShaderMaterial_0th4j"] render_priority = 0 shader = SubResource("Shader_gv186") shader_parameter/color = Color(1, 1, 1, 1) shader_parameter/specular = Color(0.3, 0.3, 0.3, 0.5) shader_parameter/fresnel = Color(0.2, 0.2, 0.2, 0.3) shader_parameter/uv_scale = Vector2(1, 1) shader_parameter/uv_offset = Vector2(0, 0) [sub_resource type="BoxMesh" id="BoxMesh_67chd"] material = SubResource("ShaderMaterial_0th4j") size = Vector3(10, 1, 10) [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_drsh3"] data = PackedVector3Array(-5, 0.5, 5, 5, 0.5, 5, -5, -0.5, 5, 5, 0.5, 5, 5, -0.5, 5, -5, -0.5, 5, 5, 0.5, -5, -5, 0.5, -5, 5, -0.5, -5, -5, 0.5, -5, -5, -0.5, -5, 5, -0.5, -5, 5, 0.5, 5, 5, 0.5, -5, 5, -0.5, 5, 5, 0.5, -5, 5, -0.5, -5, 5, -0.5, 5, -5, 0.5, -5, -5, 0.5, 5, -5, -0.5, -5, -5, 0.5, 5, -5, -0.5, 5, -5, -0.5, -5, 5, 0.5, 5, -5, 0.5, 5, 5, 0.5, -5, -5, 0.5, 5, -5, 0.5, -5, 5, 0.5, -5, -5, -0.5, 5, 5, -0.5, 5, -5, -0.5, -5, 5, -0.5, 5, 5, -0.5, -5, -5, -0.5, -5) [sub_resource type="CapsuleMesh" id="CapsuleMesh_5q2rg"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_a6eig"] [sub_resource type="BoxMesh" id="BoxMesh_21vdj"] material = ExtResource("2_8fy0v") [sub_resource type="BoxShape3D" id="BoxShape3D_nndy8"] [sub_resource type="MeshLibrary" id="MeshLibrary_udrkc"] item/0/name = "dsa" item/0/mesh = SubResource("BoxMesh_21vdj") item/0/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) item/0/shapes = [SubResource("BoxShape3D_nndy8"), Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)] item/0/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) item/0/navigation_layers = 1 [node name="TestZone" type="Node3D"] [node name="MeshInstance3D" type="MeshInstance3D" parent="."] process_mode = 4 visible = false mesh = SubResource("BoxMesh_67chd") [node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"] [node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/StaticBody3D"] shape = SubResource("ConcavePolygonShape3D_drsh3") [node name="MeshInstance3D2" type="MeshInstance3D" parent="."] process_mode = 4 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.95936, 0.687725, -3.34325) visible = false mesh = SubResource("BoxMesh_67chd") [node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D2"] [node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D2/StaticBody3D"] shape = SubResource("ConcavePolygonShape3D_drsh3") [node name="Player" type="CharacterBody3D" parent="." node_paths=PackedStringArray("camera")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.83982, 0) script = ExtResource("2_0sf88") camera = NodePath("Camera3D") [node name="MeshInstance3D2" type="MeshInstance3D" parent="Player"] mesh = SubResource("CapsuleMesh_5q2rg") skeleton = NodePath("../..") [node name="Camera3D" type="Camera3D" parent="Player"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.621505, 0) [node name="CollisionShape3D" type="CollisionShape3D" parent="Player"] shape = SubResource("CapsuleShape3D_a6eig") [node name="OmniLight3D" type="OmniLight3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.94042, 0) light_color = Color(0.69761, 0.418962, 0.0472636, 1) omni_range = 15.748 omni_attenuation = 0.210224 [node name="GridMap" type="GridMap" parent="."] mesh_library = SubResource("MeshLibrary_udrkc") cell_size = Vector3(1, 1, 1) data = { "cells": PackedInt32Array(65533, 65534, 851968, 65532, 65534, 851968, 65533, 65533, 851968, 65532, 65533, 851968, 65534, 65531, 851968, 65533, 65531, 851968, 65532, 65531, 851968, 65531, 65531, 851968, 65530, 65531, 851968, 65529, 65531, 851968, 65532, 65526, 851968, 65531, 65526, 851968, 65530, 65526, 851968, 65529, 65526, 851968, 65528, 65526, 851968, 65527, 65526, 851968, 65526, 65526, 851968, 65525, 65526, 851968, 65526, 65525, 851968, 65527, 65525, 851968, 65528, 65525, 851968, 65529, 65525, 851968, 65530, 65525, 851968, 65531, 65525, 851968, 65532, 65525, 851968, 65533, 65525, 851968, 65525, 65525, 851968, 65524, 65525, 851968, 65524, 65526, 851968, 65523, 65525, 851968, 65523, 65526, 851968, 65522, 65527, 851968, 65523, 65527, 851968, 65523, 65528, 851968, 65523, 65529, 851968, 65523, 65530, 851968, 65523, 65531, 851968, 65523, 65532, 851968, 196595, 65525, 851968, 196596, 65525, 851968, 196597, 65525, 851968, 196598, 65525, 851968, 196599, 65525, 851968, 196600, 65525, 851968, 196601, 65525, 851968, 196602, 65525, 851968, 196603, 65525, 851968, 196604, 65525, 851968, 196605, 65526, 851968, 196604, 65526, 851968, 196603, 65526, 851968, 196602, 65526, 851968, 196601, 65526, 851968, 196600, 65526, 851968, 196599, 65526, 851968, 196598, 65526, 851968, 196597, 65526, 851968, 196596, 65526, 851968, 196595, 65526, 851968, 196594, 65526, 851968, 131059, 65526, 851968, 131060, 65526, 851968, 131061, 65526, 851968, 131062, 65526, 851968, 131062, 65527, 851968, 131063, 65527, 851968, 131064, 65527, 851968, 131065, 65527, 851968, 131066, 65527, 851968, 131066, 65526, 851968, 131067, 65526, 851968, 131068, 65526, 851968, 131065, 65526, 851968, 131064, 65526, 851968, 131063, 65526, 851968, 131064, 3, 851968, 131063, 3, 851968, 131062, 3, 851968, 131062, 4, 851968, 131063, 4, 851968, 131063, 5, 786432, 131064, 5, 786432, 131065, 5, 786432, 131065, 4, 983040, 131064, 4, 851968, 131068, 8, 851968, 131063, 9, 786432, 131056, 0, 786432, 131059, 5, 786432, 131058, 5, 786432, 131057, 5, 786432, 131056, 5, 786432, 131056, 4, 786432, 131055, 4, 786432, 131055, 3, 786432, 131055, 2, 786432, 131056, 2, 786432, 131056, 1, 786432, -65550, 0, 786432, -65549, 0, 786432, -13, 0, 786432, -12, 0, 786432, 65524, 0, 786432, 65523, 0, 786432, 131059, 0, 786432, 131058, 0, 786432, 65522, 0, 786432, -14, 0, 786432, 65521, 0, 786432, -15, 0, 786432, 196594, 0, 786432, 196593, 0, 786432, 131057, 0, 786432, 65520, 0, 786432, -16, 0, 786432, -65551, 0, 786432, -131087, 0, 786432, -196623, 0, 786432, -196622, 0, 786432, -131086, 0, 786432, 262130, 0, 786432, 262129, 0, 786432, 327665, 0, 786432, 262128, 0, 786432, 196592, 0, 786432, -196621, 0, 786432, -131085, 0, 786432, -65548, 0, 786432, 196595, 0, 786432, -262158, 0, 786432, -262157, 0, 786432, -131084, 0, 786432, -65547, 0, 786432, -11, 0, 786432, 65525, 0, 786432, 131061, 0, 786432, 196597, 0, 786432, 196596, 0, 786432, 262132, 0, 786432, 327667, 0, 786432, 393203, 0, 786432, 393202, 0, 786432, 393201, 0, 786432, 327664, 0, 786432, 131055, 0, 786432, 65519, 0, 786432, -17, 0, 786432, -65552, 0, 786432, -131088, 0, 786432, -262160, 0, 786432, -327694, 0, 786432, -327693, 0, 786432, -262156, 0, 786432, -196620, 0, 786432, 131060, 0, 786432, 262131, 0, 786432, 327666, 0, 786432, -65553, 0, 786432, -131089, 0, 786432, -196625, 0, 786432, -196624, 0, 786432, -262159, 0, 786432, -327695, 0, 786432, 131062, 5, 786432, 131062, 6, 786432, 131062, 7, 786432, 131062, 8, 786432, 131062, 9, 786432, 131063, 6, 786432, 131063, 7, 786432, 131063, 8, 786432, 131064, 6, 786432, 131064, 7, 786432, 131064, 8, 786432, 131064, 9, 786432, 131065, 6, 786432, 131065, 7, 786432, 131065, 8, 786432, 131065, 9, 786432, 131066, 5, 786432, 131066, 6, 786432, 131066, 7, 786432, 131066, 8, 786432, 131066, 9, 786432, 131067, 5, 983040, 131067, 6, 786432, 131067, 7, 786432, 131067, 8, 786432, 131067, 9, 786432, 131065, 3, 983040, 131066, 4, 983040, 131068, 5, 983040, 131068, 6, 983040, 131067, 4, 983040, 131066, 3, 983040, 131066, 2, 983040, 131065, 2, 983040, 131067, 3, 983040, 131069, 6, 983040, 131069, 5, 983040, 131068, 4, 983040, 131067, 2, 983040, 131066, 1, 983040, 131068, 3, 983040, 131069, 4, 983040, 131070, 5, 983040, 131070, 6, 983040, 131068, 2, 983040, 131070, 4, 983040, 131071, 5, 983040, 131069, 3, 983040, 131068, 1, 983040, 131069, 1, 983040, 131070, 2, 983040, 131070, 3, 983040, 131071, 3, 983040, 131069, 2, 983040, 131068, 0, 983040, 65536, 5, 983040, 131071, 4, 983040, 65536, 4, 983040, 131070, 1, 983040, 131071, 2, 983040, 65536, 3, 983040, 65534, 0, 983040, 65534, 1, 983040, 65535, 1, 983040, 0, 1, 983040, 65533, 0, 983040, 65535, 0, 983040, 0, 0, 983040, 1, 0, 983040, 1, 1, 983040, 2, 1, 983040, 65533, 65535, 983040, 65532, 65535, 983040, 65534, 65535, 983040, 65535, 65535, 983040, 2, 0, 983040, 0, 65535, 983040, 65534, 65534, 983040, 65535, 65534, 983040, 1, 65535, 983040, 2, 65535, 983040, 0, 65534, 983040, 1, 65534, 983040, 65535, 65533, 983040, 65534, 65533, 983040, 0, 65533, 983040, 2, 65534, 983040, 1, 65533, 983040) } metadata/_editor_floor_ = Vector3(0, 0, 0)