diff --git a/3d/platformer/project.godot b/3d/platformer/project.godot index 5b0041c3..b8331d00 100644 --- a/3d/platformer/project.godot +++ b/3d/platformer/project.godot @@ -25,6 +25,7 @@ gdscript/warnings/untyped_declaration=1 [display] window/stretch/mode="canvas_items" +window/stretch/aspect="expand" [input] diff --git a/3d/platformer/stage/meshes/previews/corner_fix.webp.import b/3d/platformer/stage/meshes/previews/corner_fix.webp.import index 35f9fc7c..b0623787 100644 --- a/3d/platformer/stage/meshes/previews/corner_fix.webp.import +++ b/3d/platformer/stage/meshes/previews/corner_fix.webp.import @@ -3,21 +3,19 @@ importer="texture" type="CompressedTexture2D" uid="uid://cpcbdn1fytnwo" -path.s3tc="res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.s3tc.ctex" -path.etc2="res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.etc2.ctex" +path="res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.ctex" metadata={ -"imported_formats": ["s3tc_bptc", "etc2_astc"], -"vram_texture": true +"vram_texture": false } [deps] source_file="res://stage/meshes/previews/corner_fix.webp" -dest_files=["res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.s3tc.ctex", "res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.etc2.ctex"] +dest_files=["res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.ctex"] [params] -compress/mode=2 +compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 compress/uastc_level=0 diff --git a/3d/platformer/stage/panorama.webp b/3d/platformer/stage/panorama.webp deleted file mode 100644 index cd11a580..00000000 Binary files a/3d/platformer/stage/panorama.webp and /dev/null differ diff --git a/3d/platformer/stage/panorama.webp.import b/3d/platformer/stage/panorama.webp.import deleted file mode 100644 index 72d533b2..00000000 --- a/3d/platformer/stage/panorama.webp.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://c3j2c1ejqfb3m" -path="res://.godot/imported/panorama.webp-c655559bb5045314b4c9859b18ccd417.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://stage/panorama.webp" -dest_files=["res://.godot/imported/panorama.webp-c655559bb5045314b4c9859b18ccd417.ctex"] - -[params] - -compress/mode=0 -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 diff --git a/3d/platformer/stage/skybox.gdshader b/3d/platformer/stage/skybox.gdshader new file mode 100644 index 00000000..e21099fc --- /dev/null +++ b/3d/platformer/stage/skybox.gdshader @@ -0,0 +1,11 @@ +shader_type sky; + +uniform samplerCube source_panorama : filter_linear, source_color, hint_default_black; +uniform float exposure : hint_range(0, 128) = 1.0; + +void sky() { + // If importing a cubemap from another engine, you may need to flip one of the `EYEDIR` components below + // by replacing it with `-EYEDIR`. + vec3 eyedir = vec3(EYEDIR.x, EYEDIR.y, EYEDIR.z); + COLOR = texture(source_panorama, eyedir).rgb * exposure; +} diff --git a/3d/platformer/stage/skybox.gdshader.uid b/3d/platformer/stage/skybox.gdshader.uid new file mode 100644 index 00000000..6c5d4f90 --- /dev/null +++ b/3d/platformer/stage/skybox.gdshader.uid @@ -0,0 +1 @@ +uid://bromrf0kc05o8 diff --git a/3d/platformer/stage/skybox.webp b/3d/platformer/stage/skybox.webp new file mode 100644 index 00000000..99c5aa7a Binary files /dev/null and b/3d/platformer/stage/skybox.webp differ diff --git a/3d/platformer/stage/skybox.webp.import b/3d/platformer/stage/skybox.webp.import new file mode 100644 index 00000000..2e184acc --- /dev/null +++ b/3d/platformer/stage/skybox.webp.import @@ -0,0 +1,27 @@ +[remap] + +importer="cubemap_texture" +type="CompressedCubemap" +uid="uid://bnqdokul6s4pt" +path="res://.godot/imported/skybox.webp-399a875da30c2a97d4f743c79e482475.ccube" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://stage/skybox.webp" +dest_files=["res://.godot/imported/skybox.webp-399a875da30c2a97d4f743c79e482475.ccube"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +slices/arrangement=1 diff --git a/3d/platformer/stage/stage.tscn b/3d/platformer/stage/stage.tscn index d595579d..d66ea1ef 100644 --- a/3d/platformer/stage/stage.tscn +++ b/3d/platformer/stage/stage.tscn @@ -1,15 +1,18 @@ -[gd_scene load_steps=8 format=3 uid="uid://bf8hajxlmh3lw"] +[gd_scene load_steps=9 format=3 uid="uid://bf8hajxlmh3lw"] [ext_resource type="Script" uid="uid://vw47tquoshc7" path="res://stage/stage.gd" id="1_re4bd"] [ext_resource type="PackedScene" uid="uid://dmlvwah3ypol0" path="res://stage/grid_map.scn" id="1_t0f53"] -[ext_resource type="Texture2D" uid="uid://c3j2c1ejqfb3m" path="res://stage/panorama.webp" id="2_36a8a"] [ext_resource type="ArrayMesh" uid="uid://ba7lhk44sk366" path="res://stage/meshes/floor.res" id="2_vkxfl"] +[ext_resource type="Shader" uid="uid://bromrf0kc05o8" path="res://stage/skybox.gdshader" id="3_s88my"] +[ext_resource type="CompressedCubemap" uid="uid://bnqdokul6s4pt" path="res://stage/skybox.webp" id="4_ve7pq"] -[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_3qare"] -panorama = ExtResource("2_36a8a") +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ve7pq"] +shader = ExtResource("3_s88my") +shader_parameter/source_panorama = ExtResource("4_ve7pq") +shader_parameter/exposure = 1.0 [sub_resource type="Sky" id="Sky_qdkmq"] -sky_material = SubResource("PanoramaSkyMaterial_3qare") +sky_material = SubResource("ShaderMaterial_ve7pq") [sub_resource type="Environment" id="Environment_vpofs"] background_mode = 2