├── .gitignore ├── Assets └── Sunnyland │ └── artwork │ ├── Environment │ ├── back.png │ ├── back.png.import │ ├── middle.png │ ├── middle.png.import │ ├── props │ │ ├── big-crate.png │ │ ├── big-crate.png.import │ │ ├── bush.png │ │ ├── bush.png.import │ │ ├── house.png │ │ ├── house.png.import │ │ ├── rock.png │ │ ├── rock.png.import │ │ ├── shrooms.png │ │ ├── shrooms.png.import │ │ ├── tree.png │ │ └── tree.png.import │ ├── tileset.png │ └── tileset.png.import │ └── Sprites │ └── player │ └── idle │ ├── player-idle-1.png │ ├── player-idle-1.png.import │ ├── player-idle-2.png │ ├── player-idle-2.png.import │ ├── player-idle-3.png │ ├── player-idle-3.png.import │ ├── player-idle-4.png │ └── player-idle-4.png.import ├── Checkerboard.png ├── Checkerboard.png.import ├── CircularFadeOutShader ├── CircularFadeOutScene.tscn ├── UIFadeOut.tscn ├── circular_fade_out_script.gd ├── circular_fade_out_shader.gdshader ├── circular_fade_out_shader.shader └── fade_out_mat.tres ├── Dissolve ├── DissolveScene.tscn ├── dissolve_material.tres ├── dissolve_script.gd ├── dissolve_shader.gdshader └── dissolve_shader.shader ├── FakePerspective ├── FakePerspective.tscn ├── fake_perspective.gdshader └── fake_perspective_v2.gdshader ├── GithubImages ├── Dissolve.png ├── Dissolve.png.import ├── GrassSway.png ├── GrassSway.png.import ├── ImpactEffect.png ├── ImpactEffect.png.import ├── MagnifyingGlass.png ├── MagnifyingGlass.png.import ├── StealthCloak1.png ├── StealthCloak1.png.import ├── StealthCloak2.png ├── StealthCloak2.png.import ├── StealthCloak3.png ├── StealthCloak3.png.import ├── Water1.png ├── Water1.png.import ├── Water2.png ├── Water2.png.import ├── Water3.png └── Water3.png.import ├── GrassSway ├── GrassSwayScene.tscn ├── grass_sway_mat.tres ├── grass_sway_shader.gdshader └── grass_sway_shader.shader ├── ImpactEffectShader ├── ImpactEffectScene.tscn ├── RadialGradient.png ├── RadialGradient.png.import ├── Waves.png ├── Waves.png.import ├── impact_effect.gdshader ├── impact_effect_mat.tres ├── impact_effect_procedural.gd ├── impact_effect_procedural.gdshader ├── impact_effect_script.gd └── impact_effect_shader.shader ├── LICENSE ├── MagnifyingGlass ├── MagnifyingGlassScene.tscn ├── magnifying_glass.gdshader ├── magnifying_glass.shader ├── magnifying_glass_distortion_gradient.png ├── magnifying_glass_distortion_gradient.png.import ├── magnifying_glass_mat.tres ├── magnifying_glass_outline.png ├── magnifying_glass_outline.png.import └── magnifying_glass_script.gd ├── README.md ├── RingShader ├── RingShaderScene.tscn └── ring.gdshader ├── StealthCloakEffect ├── StealthCloakEffectScene.tscn ├── stealth_cloak_effect.gdshader ├── stealth_cloak_effect.shader └── stealth_cloak_effect_mat.tres ├── WaterShader ├── WaterScene.tscn ├── camera_script.gd ├── noise.png ├── noise.png.import ├── water_mat.tres ├── water_mat2.tres ├── water_script.gd ├── water_shader.gdshader └── water_shader.shader ├── default_env.tres ├── ground.tscn ├── ground_tileset.tres ├── icon.png ├── icon.png.import ├── pixel.png ├── pixel.png.import └── project.godot /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 4+ specific ignores 2 | .godot/ 3 | 4 | # Godot-specific ignores 5 | .import/ 6 | export.cfg 7 | export_presets.cfg 8 | 9 | # Mono-specific ignores 10 | .mono/ 11 | data_*/ 12 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/back.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/back.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dtqbrhmx6rgo1" 6 | path="res://.godot/imported/back.png-57f3ebe6b8f6578e3fcd1a22d863cd13.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/back.png" 14 | dest_files=["res://.godot/imported/back.png-57f3ebe6b8f6578e3fcd1a22d863cd13.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/middle.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/middle.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ckjebykt1e8jx" 6 | path="res://.godot/imported/middle.png-0cf89c8d1d46c82e3cddf61f733628bb.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/middle.png" 14 | dest_files=["res://.godot/imported/middle.png-0cf89c8d1d46c82e3cddf61f733628bb.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/big-crate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/props/big-crate.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/big-crate.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://byi2rxheft22k" 6 | path="res://.godot/imported/big-crate.png-64c97b7efb74a2f0043992d086cb5cbf.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" 14 | dest_files=["res://.godot/imported/big-crate.png-64c97b7efb74a2f0043992d086cb5cbf.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/bush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/props/bush.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/bush.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cyporcuua045k" 6 | path="res://.godot/imported/bush.png-b90361939766ba7c77181f8a70481334.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/props/bush.png" 14 | dest_files=["res://.godot/imported/bush.png-b90361939766ba7c77181f8a70481334.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/house.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/props/house.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/house.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://crhg85pob7c0f" 6 | path="res://.godot/imported/house.png-0fa67123fb85a38463487d2afd47cf81.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/props/house.png" 14 | dest_files=["res://.godot/imported/house.png-0fa67123fb85a38463487d2afd47cf81.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/rock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/props/rock.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/rock.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c4an8pnge3q21" 6 | path="res://.godot/imported/rock.png-f0db49f4c22b2cff626f009ab337882e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/props/rock.png" 14 | dest_files=["res://.godot/imported/rock.png-f0db49f4c22b2cff626f009ab337882e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/shrooms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/props/shrooms.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/shrooms.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ci2fa5t2me6h" 6 | path="res://.godot/imported/shrooms.png-5940c2144467da51ea553ab667ce8f34.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" 14 | dest_files=["res://.godot/imported/shrooms.png-5940c2144467da51ea553ab667ce8f34.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/props/tree.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/props/tree.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://boujvlbmki6bf" 6 | path="res://.godot/imported/tree.png-628a9e948bf0a1fe8127b4dd12352ea6.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/props/tree.png" 14 | dest_files=["res://.godot/imported/tree.png-628a9e948bf0a1fe8127b4dd12352ea6.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/tileset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Environment/tileset.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Environment/tileset.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cur8xkl8gqlkc" 6 | path="res://.godot/imported/tileset.png-ef892878eb7193f7f21b7be3a21600c3.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Environment/tileset.png" 14 | dest_files=["res://.godot/imported/tileset.png-ef892878eb7193f7f21b7be3a21600c3.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://6kcyoip7w4qu" 6 | path="res://.godot/imported/player-idle-1.png-1b665cdf1761da52a3a463ba6d5d76cb.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" 14 | dest_files=["res://.godot/imported/player-idle-1.png-1b665cdf1761da52a3a463ba6d5d76cb.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://s3rb6yuxqyhb" 6 | path="res://.godot/imported/player-idle-2.png-c73ee1588b275ae727e82036a9e826c5.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" 14 | dest_files=["res://.godot/imported/player-idle-2.png-c73ee1588b275ae727e82036a9e826c5.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dumqipkpdbe8k" 6 | path="res://.godot/imported/player-idle-3.png-bc8d0daeac80451265c6f46f0585c790.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" 14 | dest_files=["res://.godot/imported/player-idle-3.png-bc8d0daeac80451265c6f46f0585c790.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png -------------------------------------------------------------------------------- /Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bjf07piu25laq" 6 | path="res://.godot/imported/player-idle-4.png-0f0f75acaab18ac054eb6ac21a990ca7.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" 14 | dest_files=["res://.godot/imported/player-idle-4.png-0f0f75acaab18ac054eb6ac21a990ca7.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /Checkerboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/Checkerboard.png -------------------------------------------------------------------------------- /Checkerboard.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dk5mlb3v2bjs0" 6 | path="res://.godot/imported/Checkerboard.png-2dcd616f1d3895600bb6fdebdd2a21aa.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Checkerboard.png" 14 | dest_files=["res://.godot/imported/Checkerboard.png-2dcd616f1d3895600bb6fdebdd2a21aa.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /CircularFadeOutShader/CircularFadeOutScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=20 format=3 uid="uid://1h0qo61lqp41"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="1"] 4 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="2"] 5 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="3"] 6 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="4"] 7 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="5"] 8 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="6"] 9 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="7"] 10 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="8"] 11 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="10"] 12 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="11"] 13 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="12"] 14 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="13"] 15 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="14"] 16 | [ext_resource type="PackedScene" uid="uid://b3m47b0r3n7ro" path="res://CircularFadeOutShader/UIFadeOut.tscn" id="14_0aejs"] 17 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="15"] 18 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="16"] 19 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="17"] 20 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="19_dwhc8"] 21 | 22 | [sub_resource type="SpriteFrames" id="1"] 23 | animations = [{ 24 | "frames": [{ 25 | "duration": 1.0, 26 | "texture": ExtResource("8") 27 | }, { 28 | "duration": 1.0, 29 | "texture": ExtResource("12") 30 | }, { 31 | "duration": 1.0, 32 | "texture": ExtResource("13") 33 | }, { 34 | "duration": 1.0, 35 | "texture": ExtResource("14") 36 | }], 37 | "loop": true, 38 | "name": &"default", 39 | "speed": 5.0 40 | }] 41 | 42 | [node name="Node2D" type="Node2D"] 43 | 44 | [node name="bg" type="Sprite2D" parent="."] 45 | z_index = -5 46 | position = Vector2(15, -167.395) 47 | scale = Vector2(5, 5) 48 | texture = ExtResource("1") 49 | 50 | [node name="props" type="Node2D" parent="."] 51 | 52 | [node name="tree" type="Sprite2D" parent="props"] 53 | z_index = -1 54 | position = Vector2(-93.8489, -138.933) 55 | texture = ExtResource("2") 56 | 57 | [node name="rock" type="Sprite2D" parent="props"] 58 | position = Vector2(-47.407, -38.672) 59 | texture = ExtResource("7") 60 | 61 | [node name="rock2" type="Sprite2D" parent="props"] 62 | position = Vector2(-108.961, -37.7967) 63 | texture = ExtResource("7") 64 | 65 | [node name="shrooms" type="Sprite2D" parent="props"] 66 | position = Vector2(-114.61, -102.389) 67 | texture = ExtResource("10") 68 | 69 | [node name="shrooms2" type="Sprite2D" parent="props"] 70 | z_index = -2 71 | position = Vector2(-153.721, -102.39) 72 | texture = ExtResource("10") 73 | 74 | [node name="big-crate" type="Sprite2D" parent="props"] 75 | z_index = -1 76 | position = Vector2(-110.983, -270.636) 77 | texture = ExtResource("17") 78 | 79 | [node name="bush" type="Sprite2D" parent="props"] 80 | z_index = -1 81 | position = Vector2(-43.0405, -266.451) 82 | texture = ExtResource("15") 83 | 84 | [node name="house" type="Sprite2D" parent="props"] 85 | position = Vector2(58.7934, -83.542) 86 | texture = ExtResource("11") 87 | 88 | [node name="middle" type="Sprite2D" parent="props"] 89 | z_index = -2 90 | position = Vector2(-3.50484, -7.55041) 91 | texture = ExtResource("16") 92 | 93 | [node name="middle2" type="Sprite2D" parent="props/middle"] 94 | z_index = -2 95 | position = Vector2(176, 1.268) 96 | texture = ExtResource("16") 97 | 98 | [node name="middle3" type="Sprite2D" parent="props/middle"] 99 | z_index = -2 100 | position = Vector2(352, 1.268) 101 | texture = ExtResource("16") 102 | 103 | [node name="middle4" type="Sprite2D" parent="props/middle"] 104 | z_index = -2 105 | position = Vector2(-176, 1.268) 106 | texture = ExtResource("16") 107 | 108 | [node name="middle5" type="Sprite2D" parent="props/middle"] 109 | z_index = -2 110 | position = Vector2(-352, 1.268) 111 | texture = ExtResource("16") 112 | 113 | [node name="Player" type="AnimatedSprite2D" parent="."] 114 | z_index = 1 115 | position = Vector2(-24.7046, -47.0862) 116 | sprite_frames = SubResource("1") 117 | frame = 1 118 | 119 | [node name="Camera2D" type="Camera2D" parent="."] 120 | position = Vector2(0, -60) 121 | zoom = Vector2(2, 2) 122 | limit_smoothed = true 123 | position_smoothing_speed = 10.0 124 | script = ExtResource("4") 125 | speed = 5.0 126 | target = NodePath("../CamTarget") 127 | 128 | [node name="CamTarget" type="Node2D" parent="."] 129 | position = Vector2(0, -60) 130 | 131 | [node name="Water" type="Sprite2D" parent="."] 132 | modulate = Color(0, 0.619608, 1, 1) 133 | z_index = 5 134 | material = ExtResource("3") 135 | position = Vector2(0, -21.388) 136 | scale = Vector2(2.6, 0.8) 137 | texture = ExtResource("6") 138 | offset = Vector2(0, 256) 139 | script = ExtResource("5") 140 | cameraPath = NodePath("../Camera2D") 141 | 142 | [node name="ground" parent="." instance=ExtResource("19_dwhc8")] 143 | 144 | [node name="CanvasLayer" parent="." instance=ExtResource("14_0aejs")] 145 | 146 | [editable path="CanvasLayer"] 147 | -------------------------------------------------------------------------------- /CircularFadeOutShader/UIFadeOut.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://b3m47b0r3n7ro"] 2 | 3 | [ext_resource type="Material" uid="uid://rii3x7f3pqgn" path="res://CircularFadeOutShader/fade_out_mat.tres" id="1_afjoi"] 4 | [ext_resource type="Texture2D" uid="uid://3mjuf8jwwfly" path="res://pixel.png" id="2_kculk"] 5 | [ext_resource type="Script" path="res://CircularFadeOutShader/circular_fade_out_script.gd" id="3_tkypc"] 6 | 7 | [node name="CanvasLayer" type="CanvasLayer"] 8 | layer = 2 9 | 10 | [node name="Control" type="Control" parent="."] 11 | layout_mode = 3 12 | anchors_preset = 15 13 | anchor_right = 1.0 14 | anchor_bottom = 1.0 15 | grow_horizontal = 2 16 | grow_vertical = 2 17 | 18 | [node name="TextureRect" type="TextureRect" parent="Control"] 19 | z_index = 7 20 | material = ExtResource("1_afjoi") 21 | layout_mode = 1 22 | anchors_preset = 15 23 | anchor_right = 1.0 24 | anchor_bottom = 1.0 25 | grow_horizontal = 2 26 | grow_vertical = 2 27 | texture = ExtResource("2_kculk") 28 | script = ExtResource("3_tkypc") 29 | -------------------------------------------------------------------------------- /CircularFadeOutShader/circular_fade_out_script.gd: -------------------------------------------------------------------------------- 1 | extends TextureRect 2 | 3 | @export var fadeDuration: float = 0.5; 4 | 5 | var fadeAmount: float = 0.0; 6 | var targetPosition = Vector2(0.0, 0.0); 7 | var aspect = float(1.0); 8 | var tiling = Vector2(1.0, 1.0); 9 | var offset = Vector2(0.0, 0.0); 10 | var hypotenuse = float(1.0); 11 | 12 | func _ready(): 13 | _calculateAspect(); 14 | _calculateOffset(); 15 | _calculateHypotenuse(); 16 | pass 17 | 18 | func _input(event): 19 | if event is InputEventMouseButton: 20 | if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: 21 | targetPosition = _getNormalizedScreenPosition(event.position); 22 | _tweeenFade(); 23 | 24 | func _tweeenFade(): 25 | _calculateAspect(); 26 | _calculateOffset(); 27 | _calculateHypotenuse(); 28 | _setShaderParameters(); 29 | var tween = get_tree().create_tween(); 30 | tween.tween_method( 31 | func(value): material.set_shader_parameter("fadeAmount", value), 32 | 0.0, 1.0, 33 | fadeDuration); 34 | tween.tween_method( 35 | func(value): material.set_shader_parameter("fadeAmount", value), 36 | 1.0, 0.0, 37 | fadeDuration); 38 | pass 39 | 40 | func _getNormalizedScreenPosition(screenPos): 41 | screenPos.x /= get_window().size.x; 42 | screenPos.y /= get_window().size.y; 43 | return screenPos; 44 | 45 | func _calculateAspect(): 46 | var size = get_window().size; 47 | if (size.x > size.y): 48 | aspect = float(size.x) / size.y; 49 | tiling.x = aspect; 50 | tiling.y = 1; 51 | else: 52 | aspect = float(size.y) / size.x; 53 | tiling.y = aspect; 54 | tiling.x = 1; 55 | pass 56 | 57 | func _calculateOffset(): 58 | offset = targetPosition; 59 | 60 | if (get_window().size.x > get_window().size.y): 61 | offset.x *= aspect; 62 | else: 63 | offset.y *= aspect; 64 | 65 | pass 66 | 67 | func _calculateHypotenuse(): 68 | var x = offset.x; 69 | var y = offset.y; 70 | 71 | var screenCenterNormalized = Vector2(0.5, 0.5); 72 | if(get_window().size.x > get_window().size.y): 73 | screenCenterNormalized.x *= aspect; 74 | else: 75 | screenCenterNormalized.y *= aspect; 76 | 77 | # fade out center is in the left portion of the screen, calculate distance to the right side of the screen 78 | if(x < screenCenterNormalized.x): 79 | x = screenCenterNormalized.x * 2 - x; 80 | # fade out center is in the top portion of the screen, calculate distance to the bottom side of the screen 81 | if(y < screenCenterNormalized.y): 82 | y = screenCenterNormalized.y * 2 - y; 83 | 84 | hypotenuse = sqrt(x * x + y * y); 85 | 86 | pass 87 | 88 | func _setShaderParameters(): 89 | self.material.set_shader_parameter("hypotenuse", hypotenuse); 90 | self.material.set_shader_parameter("offset", offset); 91 | self.material.set_shader_parameter("tiling", tiling); 92 | pass 93 | -------------------------------------------------------------------------------- /CircularFadeOutShader/circular_fade_out_shader.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float fadeAmount : hint_range(0, 1) = 1; 4 | uniform float fadeSmoothing : hint_range(0, 1) = 0.5; 5 | uniform vec4 fadeColor : source_color; 6 | uniform vec2 offset = vec2(0.5, 0.5); 7 | uniform vec2 tiling = vec2(1.0, 1.0); 8 | 9 | uniform float hypotenuse = 0.707; 10 | 11 | 12 | void fragment() 13 | { 14 | vec4 fadeMask = fadeColor; 15 | vec2 center = UV * tiling - offset; 16 | 17 | float fadeDistance = length(center); 18 | 19 | float invertedFadeAmount = 1.0 - fadeAmount; 20 | float remappedFade = invertedFadeAmount * (invertedFadeAmount * hypotenuse + fadeSmoothing) - fadeSmoothing; 21 | fadeMask.a = smoothstep(0.0, fadeSmoothing, fadeDistance - remappedFade); 22 | 23 | COLOR = fadeMask; 24 | } -------------------------------------------------------------------------------- /CircularFadeOutShader/circular_fade_out_shader.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float offsetStrength : hint_range(0, 1); 4 | uniform float fadeAmount : hint_range(0, 1) = 1; 5 | uniform float fadeSmoothing : hint_range(0, 1) = 0.5; 6 | uniform vec4 fadeColor : hint_color; 7 | uniform vec2 offset = vec2(0.5, 0.5); 8 | uniform vec2 tiling = vec2(1.0, 1.0); 9 | 10 | uniform float hypotenuse = 0.707; 11 | 12 | 13 | void fragment() 14 | { 15 | 16 | /* 17 | //step 1 18 | vec4 fadeMask = fadeColor; 19 | 20 | COLOR = fadeMask; 21 | */ 22 | 23 | /* 24 | //step 2 25 | vec4 fadeMask = fadeColor; 26 | 27 | vec2 center = UV; 28 | float fadeDistance = length(center); 29 | 30 | fadeMask.a = fadeDistance; 31 | 32 | COLOR = fadeMask; 33 | */ 34 | 35 | /* 36 | //step 3 37 | vec4 fadeMask = fadeColor; 38 | 39 | vec2 center = UV; 40 | float fadeDistance = length(center); 41 | 42 | fadeMask.a = step(fadeDistance, fadeAmount); 43 | 44 | COLOR = fadeMask; 45 | */ 46 | 47 | /* 48 | // step 4 49 | vec4 fadeMask = fadeColor; 50 | 51 | vec2 center = UV - 0.5; 52 | float fadeDistance = length(center); 53 | 54 | fadeMask.a = step(fadeDistance, fadeAmount); 55 | 56 | COLOR = fadeMask; 57 | */ 58 | 59 | /* 60 | // step 5 61 | vec4 fadeMask = fadeColor; 62 | 63 | vec2 center = UV - 0.5; 64 | float fadeDistance = length(center); 65 | 66 | float remappedFade = fadeAmount * hypotenuse; 67 | 68 | fadeMask.a = step(fadeDistance, remappedFade); 69 | 70 | COLOR = fadeMask;*/ 71 | 72 | /* 73 | // step 6 74 | vec4 fadeMask = fadeColor; 75 | 76 | vec2 center = UV - 0.5; 77 | 78 | float fadeDistance = length(center); 79 | 80 | float remappedFade = fadeAmount * hypotenuse; 81 | 82 | fadeMask.a = smoothstep(0.0, 1.0 * fadeSmoothing, fadeDistance - remappedFade); 83 | 84 | COLOR = fadeMask; 85 | */ 86 | 87 | 88 | /* 89 | // step 7 90 | vec4 fadeMask = fadeColor; 91 | 92 | vec2 center = UV - 0.5; 93 | 94 | float fadeDistance = length(center); 95 | 96 | float invertedFadeAmount = 1.0 - fadeAmount; 97 | 98 | float remappedFade = invertedFadeAmount * hypotenuse; 99 | 100 | fadeMask.a = smoothstep(0.0, 1.0 * fadeSmoothing, fadeDistance - remappedFade); 101 | 102 | COLOR = fadeMask;*/ 103 | 104 | /* 105 | // step 8 106 | vec4 fadeMask = fadeColor; 107 | 108 | vec2 center = UV - 0.5; 109 | 110 | float fadeDistance = length(center); 111 | 112 | float invertedFadeAmount = 1.0 - fadeAmount; 113 | 114 | float remappedFade = invertedFadeAmount * (invertedFadeAmount * hypotenuse + fadeSmoothing) - fadeSmoothing; 115 | 116 | fadeMask.a = smoothstep(0.0, 1.0 * fadeSmoothing, fadeDistance - remappedFade); 117 | 118 | COLOR = fadeMask; 119 | */ 120 | 121 | /* 122 | // step 9 123 | vec4 fadeMask = fadeColor; 124 | 125 | vec2 center = UV - offset; 126 | 127 | float fadeDistance = length(center); 128 | 129 | float invertedFadeAmount = 1.0 - fadeAmount; 130 | 131 | float remappedFade = invertedFadeAmount * (invertedFadeAmount * hypotenuse + fadeSmoothing) - fadeSmoothing; 132 | 133 | fadeMask.a = smoothstep(0.0, 1.0 * fadeSmoothing, fadeDistance - remappedFade); 134 | 135 | COLOR = fadeMask; 136 | */ 137 | 138 | 139 | // step 10 140 | vec4 fadeMask = fadeColor; 141 | 142 | vec2 center = UV * tiling - offset; 143 | 144 | float fadeDistance = length(center); 145 | 146 | float invertedFadeAmount = 1.0 - fadeAmount; 147 | 148 | float remappedFade = invertedFadeAmount * (invertedFadeAmount * hypotenuse + fadeSmoothing) - fadeSmoothing; 149 | 150 | fadeMask.a = smoothstep(0.0, 1.0 * fadeSmoothing, fadeDistance - remappedFade); 151 | 152 | COLOR = fadeMask; 153 | 154 | 155 | /* 156 | vec4 fadeMask = fadeColor; 157 | //vec2 center = UV - 0.5; 158 | vec2 center = UV * tiling - offset; 159 | 160 | // 0.70711 - hypotenuse of the triangle with sides 0.5 and 0.5 161 | //(value - from1) / (to1 - from1) * (to2 - from2) + from2 162 | // 0.70711 - is a hypotenuse of a triangle with sides of 0.5 and 0.5 - which are UV coordinates 163 | // we're using it so that the complete fade out/in happens when reaching the corner 164 | float fade = 1.0 - fadeAmount; 165 | //float remappedFade = (fade * (fade * 0.70711 + fadeSmoothing) - fadeSmoothing); 166 | float remappedFade = (fade * (fade * hypotenuse + fadeSmoothing) - fadeSmoothing); 167 | 168 | float step2 = smoothstep(0., 1.0 * fadeSmoothing, length(center) - remappedFade); 169 | fadeMask.a *= step2; 170 | 171 | COLOR = fadeMask;*/ 172 | 173 | 174 | } -------------------------------------------------------------------------------- /CircularFadeOutShader/fade_out_mat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://rii3x7f3pqgn"] 2 | 3 | [ext_resource type="Shader" path="res://CircularFadeOutShader/circular_fade_out_shader.gdshader" id="1"] 4 | 5 | [resource] 6 | shader = ExtResource("1") 7 | shader_parameter/fadeAmount = 0.0 8 | shader_parameter/fadeSmoothing = 0.036 9 | shader_parameter/fadeColor = null 10 | shader_parameter/offset = Vector2(0.5, 0.5) 11 | shader_parameter/tiling = Vector2(1, 1) 12 | shader_parameter/hypotenuse = 0.707 13 | -------------------------------------------------------------------------------- /Dissolve/DissolveScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=21 format=3 uid="uid://cod4wudrnj5l"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="2"] 4 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="3"] 5 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="4"] 6 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="5"] 7 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="6"] 8 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="7"] 9 | [ext_resource type="Material" uid="uid://y6hmhlvxrcnj" path="res://Dissolve/dissolve_material.tres" id="8"] 10 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="9"] 11 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="10"] 12 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="11"] 13 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="12"] 14 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="13"] 15 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="14"] 16 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="15"] 17 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="16"] 18 | [ext_resource type="Script" path="res://Dissolve/dissolve_script.gd" id="17"] 19 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="19"] 20 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="19_jg73x"] 21 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="20"] 22 | 23 | [sub_resource type="SpriteFrames" id="1"] 24 | animations = [{ 25 | "frames": [{ 26 | "duration": 1.0, 27 | "texture": ExtResource("15") 28 | }, { 29 | "duration": 1.0, 30 | "texture": ExtResource("11") 31 | }, { 32 | "duration": 1.0, 33 | "texture": ExtResource("9") 34 | }, { 35 | "duration": 1.0, 36 | "texture": ExtResource("14") 37 | }], 38 | "loop": true, 39 | "name": &"default", 40 | "speed": 5.0 41 | }] 42 | 43 | [node name="Node2D" type="Node2D"] 44 | 45 | [node name="bg" type="Sprite2D" parent="."] 46 | z_index = -5 47 | position = Vector2(15, -167.395) 48 | scale = Vector2(5, 5) 49 | texture = ExtResource("2") 50 | 51 | [node name="props" type="Node2D" parent="."] 52 | 53 | [node name="tree" type="Sprite2D" parent="props"] 54 | z_index = -2 55 | position = Vector2(-93.8489, -138.933) 56 | texture = ExtResource("4") 57 | 58 | [node name="rock" type="Sprite2D" parent="props"] 59 | z_index = -2 60 | position = Vector2(-47.407, -38.672) 61 | texture = ExtResource("5") 62 | 63 | [node name="rock2" type="Sprite2D" parent="props"] 64 | z_index = -2 65 | position = Vector2(-108.961, -37.7967) 66 | texture = ExtResource("5") 67 | 68 | [node name="shrooms" type="Sprite2D" parent="props"] 69 | z_index = -2 70 | position = Vector2(-114.61, -102.389) 71 | texture = ExtResource("13") 72 | 73 | [node name="shrooms2" type="Sprite2D" parent="props"] 74 | z_index = -2 75 | position = Vector2(-153.721, -102.39) 76 | texture = ExtResource("13") 77 | 78 | [node name="big-crate" type="Sprite2D" parent="props"] 79 | z_index = -2 80 | position = Vector2(-110.983, -270.636) 81 | texture = ExtResource("12") 82 | 83 | [node name="bush" type="Sprite2D" parent="props"] 84 | z_index = -2 85 | position = Vector2(-43.0405, -266.451) 86 | texture = ExtResource("10") 87 | 88 | [node name="house" type="Sprite2D" parent="props"] 89 | z_index = -2 90 | material = ExtResource("8") 91 | position = Vector2(51.684, -85.842) 92 | texture = ExtResource("6") 93 | script = ExtResource("17") 94 | 95 | [node name="Node2D" type="Node2D" parent="props"] 96 | 97 | [node name="middle" type="Sprite2D" parent="props/Node2D"] 98 | z_index = -3 99 | position = Vector2(-3.50484, -7.55041) 100 | texture = ExtResource("7") 101 | 102 | [node name="middle2" type="Sprite2D" parent="props/Node2D"] 103 | z_index = -3 104 | position = Vector2(172.495, -6.28241) 105 | texture = ExtResource("7") 106 | 107 | [node name="middle3" type="Sprite2D" parent="props/Node2D"] 108 | z_index = -3 109 | position = Vector2(348.495, -6.28241) 110 | texture = ExtResource("7") 111 | 112 | [node name="middle4" type="Sprite2D" parent="props/Node2D"] 113 | z_index = -3 114 | position = Vector2(-179.505, -6.28241) 115 | texture = ExtResource("7") 116 | 117 | [node name="middle5" type="Sprite2D" parent="props/Node2D"] 118 | z_index = -3 119 | position = Vector2(-355.505, -6.28241) 120 | texture = ExtResource("7") 121 | 122 | [node name="Player" type="AnimatedSprite2D" parent="."] 123 | z_index = 1 124 | position = Vector2(-24.7046, -47.0862) 125 | sprite_frames = SubResource("1") 126 | frame = 1 127 | 128 | [node name="Camera2D" type="Camera2D" parent="."] 129 | position = Vector2(0, -100) 130 | zoom = Vector2(3, 3) 131 | limit_smoothed = true 132 | position_smoothing_speed = 10.0 133 | script = ExtResource("19") 134 | positionIncrement = 1.0 135 | target = NodePath("../CamTarget") 136 | 137 | [node name="CamTarget" type="Node2D" parent="."] 138 | position = Vector2(0, -100) 139 | 140 | [node name="Water" type="Sprite2D" parent="."] 141 | modulate = Color(0, 0.619608, 1, 1) 142 | z_index = 5 143 | material = ExtResource("16") 144 | scale = Vector2(1.25064, 0.79958) 145 | texture = ExtResource("3") 146 | offset = Vector2(0, 256) 147 | script = ExtResource("20") 148 | cameraPath = NodePath("../Camera2D") 149 | 150 | [node name="ground" parent="." instance=ExtResource("19_jg73x")] 151 | -------------------------------------------------------------------------------- /Dissolve/dissolve_material.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://y6hmhlvxrcnj"] 2 | 3 | [ext_resource type="Shader" path="res://Dissolve/dissolve_shader.gdshader" id="1"] 4 | 5 | [sub_resource type="FastNoiseLite" id="1"] 6 | 7 | [sub_resource type="NoiseTexture2D" id="2"] 8 | seamless = true 9 | noise = SubResource("1") 10 | 11 | [resource] 12 | shader = ExtResource("1") 13 | shader_parameter/noiseTiling = 2.0 14 | shader_parameter/dissolveAmount = 0.0 15 | shader_parameter/edgeThickness = 0.05 16 | shader_parameter/edgeColor = Color(0, 0.0862745, 1, 1) 17 | shader_parameter/noiseTexture = SubResource("2") 18 | -------------------------------------------------------------------------------- /Dissolve/dissolve_script.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | func _input(event): 4 | if event is InputEventMouseButton: 5 | if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: 6 | var tween = get_tree().create_tween(); 7 | tween.tween_method( 8 | func(value): material.set_shader_parameter("dissolveAmount", value), 9 | 0.0, 1.0, 10 | 0.5); 11 | if event.button_index == MOUSE_BUTTON_RIGHT and event.pressed: 12 | var tween = get_tree().create_tween(); 13 | tween.tween_method( 14 | func(value): material.set_shader_parameter("dissolveAmount", value), 15 | 1.0, 0.0, 16 | 0.5); 17 | 18 | -------------------------------------------------------------------------------- /Dissolve/dissolve_shader.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D noiseTexture: repeat_enable; 4 | uniform float noiseTiling = 2; 5 | uniform float dissolveAmount : hint_range(0, 1); 6 | uniform float edgeThickness = 0.01; 7 | uniform vec4 edgeColor : source_color; 8 | 9 | void fragment() 10 | { 11 | vec4 originalTexture = texture(TEXTURE, UV); 12 | 13 | vec4 dissolveNoise = texture(noiseTexture, UV * noiseTiling); 14 | 15 | // remapping to account for edge thickness 16 | float remappedDissolve = dissolveAmount * (1.01 + edgeThickness) - edgeThickness; 17 | 18 | vec4 step1 = step(remappedDissolve, dissolveNoise); // step function turns all values in the noise texture below dissolve amount to black and above to white 19 | vec4 step2 = step(remappedDissolve + edgeThickness, dissolveNoise); 20 | 21 | vec4 edgeArea = step1 - step2; // difference between results of two step functions is the edge area 22 | edgeArea.a = 1.; 23 | 24 | edgeArea.a *= originalTexture.a;// setting the colored parts that are outside of the original texture to be transparent 25 | originalTexture.a *= step1.r;// making the parts lower than the dissolveAmount transparent 26 | 27 | // coloring the edge in separate variable to keep the rgb info that defines edge area in order to allow different edge colors to work properly 28 | vec4 coloredEdge = edgeArea * edgeColor; 29 | 30 | //combining colors based on the edge area 31 | vec4 combinedColor = mix(originalTexture, coloredEdge, edgeArea.r); 32 | COLOR = combinedColor; 33 | } 34 | -------------------------------------------------------------------------------- /Dissolve/dissolve_shader.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D noiseTexture; 4 | uniform float noiseTiling = 2; 5 | uniform float dissolveAmount : hint_range(0, 1); 6 | uniform float edgeThickness = 0.01; 7 | uniform vec4 edgeColor : hint_color; 8 | 9 | void fragment() 10 | { 11 | vec4 originalTexture = texture(TEXTURE, UV); 12 | 13 | vec4 dissolveNoise = texture(noiseTexture, UV * noiseTiling); 14 | 15 | // remapping to account for edge thickness 16 | float remappedDissolve = dissolveAmount * (1.01 + edgeThickness) - edgeThickness; 17 | 18 | vec4 step1 = step(remappedDissolve, dissolveNoise); // step function turns all values in the noise texture below dissolve amount to black and above to white 19 | vec4 step2 = step(remappedDissolve + edgeThickness, dissolveNoise); 20 | 21 | vec4 edgeArea = step1 - step2; // difference between results of two step functions is the edge area 22 | edgeArea.a = 1.; 23 | 24 | edgeArea.a *= originalTexture.a;// setting the colored parts that are outside of the original texture to be transparent 25 | originalTexture.a *= step1.r;// making the parts lower than the dissolveAmount transparent 26 | 27 | // coloring the edge in separate variable to keep the rgb info that defines edge area in order to allow different edge colors to work properly 28 | vec4 coloredEdge = edgeArea * edgeColor; 29 | 30 | //combining colors based on the edge area 31 | vec4 combinedColor = mix(originalTexture, coloredEdge, edgeArea.r); 32 | COLOR = combinedColor; 33 | } 34 | -------------------------------------------------------------------------------- /FakePerspective/FakePerspective.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=24 format=3 uid="uid://bteg38i4y50gv"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="1_abxph"] 4 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="2_to1a0"] 5 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="3_g15ir"] 6 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="4_lacuo"] 7 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="5_unmip"] 8 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="6_t5ld4"] 9 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="7_m3lpq"] 10 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="8_ki65r"] 11 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="9_jcmjp"] 12 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="10_l8fui"] 13 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="11_5s1mk"] 14 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="12_50n8c"] 15 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="13_8dr4c"] 16 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="14_wv1dl"] 17 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="15_xsies"] 18 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="16_iwf0r"] 19 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="17_okm6k"] 20 | [ext_resource type="Shader" path="res://FakePerspective/fake_perspective.gdshader" id="18_fnx5e"] 21 | [ext_resource type="Texture2D" uid="uid://dk5mlb3v2bjs0" path="res://Checkerboard.png" id="19_nynuj"] 22 | [ext_resource type="Shader" path="res://FakePerspective/fake_perspective_v2.gdshader" id="20_bgol4"] 23 | 24 | [sub_resource type="SpriteFrames" id="1"] 25 | animations = [{ 26 | "frames": [{ 27 | "duration": 1.0, 28 | "texture": ExtResource("10_l8fui") 29 | }, { 30 | "duration": 1.0, 31 | "texture": ExtResource("11_5s1mk") 32 | }, { 33 | "duration": 1.0, 34 | "texture": ExtResource("12_50n8c") 35 | }, { 36 | "duration": 1.0, 37 | "texture": ExtResource("13_8dr4c") 38 | }], 39 | "loop": true, 40 | "name": &"default", 41 | "speed": 5.0 42 | }] 43 | 44 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_7qpcr"] 45 | shader = ExtResource("18_fnx5e") 46 | shader_parameter/offset = Vector2(0, 0) 47 | shader_parameter/perspective = 1.0 48 | shader_parameter/horizontalTiling = 1.0 49 | 50 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_hg1ec"] 51 | shader = ExtResource("20_bgol4") 52 | shader_parameter/tiling = Vector2(1, 4) 53 | shader_parameter/offset = Vector2(0, 0) 54 | shader_parameter/perspective = 2.0 55 | 56 | [node name="Node2D" type="Node2D"] 57 | 58 | [node name="ground" parent="." instance=ExtResource("1_abxph")] 59 | 60 | [node name="bg" type="Sprite2D" parent="."] 61 | z_index = -5 62 | position = Vector2(15, -167.395) 63 | scale = Vector2(5, 5) 64 | texture = ExtResource("2_to1a0") 65 | 66 | [node name="props" type="Node2D" parent="."] 67 | 68 | [node name="tree" type="Sprite2D" parent="props"] 69 | z_index = -1 70 | position = Vector2(-93.8489, -138.933) 71 | texture = ExtResource("3_g15ir") 72 | 73 | [node name="rock" type="Sprite2D" parent="props"] 74 | position = Vector2(-47.407, -38.672) 75 | texture = ExtResource("4_lacuo") 76 | 77 | [node name="rock2" type="Sprite2D" parent="props"] 78 | position = Vector2(-108.961, -37.7967) 79 | texture = ExtResource("4_lacuo") 80 | 81 | [node name="shrooms" type="Sprite2D" parent="props"] 82 | position = Vector2(-114.61, -102.389) 83 | texture = ExtResource("5_unmip") 84 | 85 | [node name="shrooms2" type="Sprite2D" parent="props"] 86 | z_index = -2 87 | position = Vector2(-153.721, -102.39) 88 | texture = ExtResource("5_unmip") 89 | 90 | [node name="big-crate" type="Sprite2D" parent="props"] 91 | z_index = -1 92 | position = Vector2(-110.983, -270.636) 93 | texture = ExtResource("6_t5ld4") 94 | 95 | [node name="bush" type="Sprite2D" parent="props"] 96 | z_index = -1 97 | position = Vector2(-43.0405, -266.451) 98 | texture = ExtResource("7_m3lpq") 99 | 100 | [node name="house" type="Sprite2D" parent="props"] 101 | texture_repeat = 2 102 | position = Vector2(58.7934, -83.542) 103 | texture = ExtResource("8_ki65r") 104 | 105 | [node name="middle" type="Sprite2D" parent="props"] 106 | z_index = -2 107 | position = Vector2(-3.50484, -7.55041) 108 | texture = ExtResource("9_jcmjp") 109 | 110 | [node name="middle2" type="Sprite2D" parent="props/middle"] 111 | z_index = -2 112 | position = Vector2(176, 1.268) 113 | texture = ExtResource("9_jcmjp") 114 | 115 | [node name="middle3" type="Sprite2D" parent="props/middle"] 116 | z_index = -2 117 | position = Vector2(352, 1.268) 118 | texture = ExtResource("9_jcmjp") 119 | 120 | [node name="middle4" type="Sprite2D" parent="props/middle"] 121 | z_index = -2 122 | position = Vector2(-176, 1.268) 123 | texture = ExtResource("9_jcmjp") 124 | 125 | [node name="middle5" type="Sprite2D" parent="props/middle"] 126 | z_index = -2 127 | position = Vector2(-352, 1.268) 128 | texture = ExtResource("9_jcmjp") 129 | 130 | [node name="Player" type="AnimatedSprite2D" parent="."] 131 | z_index = 1 132 | texture_repeat = 2 133 | position = Vector2(-33, -63.7) 134 | sprite_frames = SubResource("1") 135 | frame = 3 136 | offset = Vector2(0, 16) 137 | 138 | [node name="Camera2D" type="Camera2D" parent="."] 139 | position = Vector2(0, -10) 140 | zoom = Vector2(2, 2) 141 | limit_smoothed = true 142 | position_smoothing_speed = 10.0 143 | script = ExtResource("14_wv1dl") 144 | zoomIncrement = 0.1 145 | speed = 5.0 146 | target = NodePath("../CamTarget") 147 | 148 | [node name="CamTarget" type="Node2D" parent="."] 149 | 150 | [node name="Water" type="Sprite2D" parent="."] 151 | z_index = 5 152 | texture_repeat = 2 153 | material = ExtResource("15_xsies") 154 | scale = Vector2(2.6, 0.169922) 155 | texture = ExtResource("16_iwf0r") 156 | offset = Vector2(0, 256) 157 | region_enabled = true 158 | region_rect = Rect2(0, 0, 512, 512) 159 | script = ExtResource("17_okm6k") 160 | cameraPath = NodePath("../Camera2D") 161 | 162 | [node name="Original" type="Sprite2D" parent="."] 163 | texture_repeat = 2 164 | position = Vector2(-67.32, -81) 165 | scale = Vector2(0.2, 0.2) 166 | texture = ExtResource("19_nynuj") 167 | 168 | [node name="FakePerspective_v1" type="Sprite2D" parent="Original"] 169 | texture_repeat = 2 170 | material = SubResource("ShaderMaterial_7qpcr") 171 | position = Vector2(626.6, -20) 172 | texture = ExtResource("19_nynuj") 173 | 174 | [node name="FakePerspective_v2" type="Sprite2D" parent="Original"] 175 | texture_repeat = 2 176 | material = SubResource("ShaderMaterial_hg1ec") 177 | position = Vector2(1256.6, -20) 178 | texture = ExtResource("19_nynuj") 179 | -------------------------------------------------------------------------------- /FakePerspective/fake_perspective.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform vec2 offset = vec2(0.0); 4 | uniform float perspective = 1.; 5 | uniform float horizontalTiling = 1.; 6 | 7 | uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; 8 | varying vec2 vertPos; 9 | void vertex() 10 | { 11 | vertPos = VERTEX; 12 | } 13 | 14 | void fragment() { 15 | vec2 uv = UV; 16 | uv = vec2(UV.r, UV.g * perspective) + vec2(-0.5, .5); 17 | uv.r *= horizontalTiling; 18 | 19 | vec3 viewDir = normalize(vec3(uv, -1.)); 20 | vec2 planarUV = viewDir.xz/abs(viewDir.y); 21 | vec4 color = texture(TEXTURE, planarUV + offset); 22 | COLOR = vec4(uv, 0., 1.); 23 | COLOR = color; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /FakePerspective/fake_perspective_v2.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform vec2 tiling = vec2(1., 4.); 4 | uniform vec2 offset = vec2(0.); 5 | uniform float perspective = 2.; 6 | 7 | void fragment() { 8 | vec2 uv = UV; 9 | uv.x = uv.x * 2. - 1.; 10 | 11 | uv.x /= (1.0 + uv.y * perspective); 12 | uv.y /= (1.0 + uv.y * perspective); 13 | uv = uv * tiling + offset; 14 | vec4 color = texture(TEXTURE, uv); 15 | COLOR = color; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /GithubImages/Dissolve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/Dissolve.png -------------------------------------------------------------------------------- /GithubImages/Dissolve.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://qlg3t7v70stj" 6 | path="res://.godot/imported/Dissolve.png-8e579aa8672a0285bc0c1beaf7fe3f6e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/Dissolve.png" 14 | dest_files=["res://.godot/imported/Dissolve.png-8e579aa8672a0285bc0c1beaf7fe3f6e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/GrassSway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/GrassSway.png -------------------------------------------------------------------------------- /GithubImages/GrassSway.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ce6awv2sg5jpe" 6 | path="res://.godot/imported/GrassSway.png-3abed01a90bb9583ae6619c48bd1e774.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/GrassSway.png" 14 | dest_files=["res://.godot/imported/GrassSway.png-3abed01a90bb9583ae6619c48bd1e774.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/ImpactEffect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/ImpactEffect.png -------------------------------------------------------------------------------- /GithubImages/ImpactEffect.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cdhtndvoya1v1" 6 | path="res://.godot/imported/ImpactEffect.png-381e372165fd75cbeab53e0c82e77514.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/ImpactEffect.png" 14 | dest_files=["res://.godot/imported/ImpactEffect.png-381e372165fd75cbeab53e0c82e77514.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/MagnifyingGlass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/MagnifyingGlass.png -------------------------------------------------------------------------------- /GithubImages/MagnifyingGlass.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b6j6kjg1fnoo0" 6 | path="res://.godot/imported/MagnifyingGlass.png-6979495231bef017b40437dcbc190f17.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/MagnifyingGlass.png" 14 | dest_files=["res://.godot/imported/MagnifyingGlass.png-6979495231bef017b40437dcbc190f17.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/StealthCloak1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/StealthCloak1.png -------------------------------------------------------------------------------- /GithubImages/StealthCloak1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://0svqw4rkrfb1" 6 | path="res://.godot/imported/StealthCloak1.png-664565db5088eaf90cb298fd41dbc002.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/StealthCloak1.png" 14 | dest_files=["res://.godot/imported/StealthCloak1.png-664565db5088eaf90cb298fd41dbc002.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/StealthCloak2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/StealthCloak2.png -------------------------------------------------------------------------------- /GithubImages/StealthCloak2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://yj5oe3l0qkie" 6 | path="res://.godot/imported/StealthCloak2.png-9e95e116aa7043bbcdc9a56cb3b5ef49.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/StealthCloak2.png" 14 | dest_files=["res://.godot/imported/StealthCloak2.png-9e95e116aa7043bbcdc9a56cb3b5ef49.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/StealthCloak3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/StealthCloak3.png -------------------------------------------------------------------------------- /GithubImages/StealthCloak3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bkcq64d6b3y3a" 6 | path="res://.godot/imported/StealthCloak3.png-d43d21c0b3ac96d6095a019b19eac606.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/StealthCloak3.png" 14 | dest_files=["res://.godot/imported/StealthCloak3.png-d43d21c0b3ac96d6095a019b19eac606.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/Water1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/Water1.png -------------------------------------------------------------------------------- /GithubImages/Water1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cngtqiijcnl3t" 6 | path="res://.godot/imported/Water1.png-9330871da1048d9cabd3fb5ba9c12687.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/Water1.png" 14 | dest_files=["res://.godot/imported/Water1.png-9330871da1048d9cabd3fb5ba9c12687.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/Water2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/Water2.png -------------------------------------------------------------------------------- /GithubImages/Water2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b6xcq6d7ark11" 6 | path="res://.godot/imported/Water2.png-e3a7260caae1ee2d333e95974dbd5add.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/Water2.png" 14 | dest_files=["res://.godot/imported/Water2.png-e3a7260caae1ee2d333e95974dbd5add.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GithubImages/Water3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/GithubImages/Water3.png -------------------------------------------------------------------------------- /GithubImages/Water3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c8fo4phsbxrhs" 6 | path="res://.godot/imported/Water3.png-0aca5f2406c5119bae5281240f822b26.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://GithubImages/Water3.png" 14 | dest_files=["res://.godot/imported/Water3.png-0aca5f2406c5119bae5281240f822b26.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /GrassSway/GrassSwayScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=20 format=3 uid="uid://b1672eemxccci"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="1"] 4 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="2"] 5 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="3"] 6 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="4"] 7 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="5"] 8 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="6"] 9 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="7"] 10 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="8"] 11 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="10"] 12 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="11"] 13 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="12"] 14 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="13"] 15 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="14"] 16 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="15"] 17 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="16"] 18 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="17"] 19 | [ext_resource type="Material" uid="uid://c5m7fu58vrbff" path="res://GrassSway/grass_sway_mat.tres" id="18"] 20 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="18_j5h7r"] 21 | 22 | [sub_resource type="SpriteFrames" id="1"] 23 | animations = [{ 24 | "frames": [{ 25 | "duration": 1.0, 26 | "texture": ExtResource("8") 27 | }, { 28 | "duration": 1.0, 29 | "texture": ExtResource("12") 30 | }, { 31 | "duration": 1.0, 32 | "texture": ExtResource("13") 33 | }, { 34 | "duration": 1.0, 35 | "texture": ExtResource("14") 36 | }], 37 | "loop": true, 38 | "name": &"default", 39 | "speed": 5.0 40 | }] 41 | 42 | [node name="Node2D" type="Node2D"] 43 | 44 | [node name="bg" type="Sprite2D" parent="."] 45 | z_index = -5 46 | position = Vector2(15, -167.395) 47 | scale = Vector2(5, 5) 48 | texture = ExtResource("1") 49 | 50 | [node name="props" type="Node2D" parent="."] 51 | 52 | [node name="tree" type="Sprite2D" parent="props"] 53 | z_index = -1 54 | position = Vector2(-93.8489, -138.933) 55 | texture = ExtResource("2") 56 | 57 | [node name="rock" type="Sprite2D" parent="props"] 58 | position = Vector2(-47.407, -38.672) 59 | texture = ExtResource("7") 60 | 61 | [node name="rock2" type="Sprite2D" parent="props"] 62 | position = Vector2(-108.961, -37.7967) 63 | texture = ExtResource("7") 64 | 65 | [node name="shrooms" type="Sprite2D" parent="props"] 66 | position = Vector2(-114.61, -102.389) 67 | texture = ExtResource("10") 68 | 69 | [node name="shrooms2" type="Sprite2D" parent="props"] 70 | z_index = -2 71 | position = Vector2(-153.721, -102.39) 72 | texture = ExtResource("10") 73 | 74 | [node name="big-crate" type="Sprite2D" parent="props"] 75 | z_index = -1 76 | position = Vector2(-110.983, -270.636) 77 | texture = ExtResource("17") 78 | 79 | [node name="bush" type="Sprite2D" parent="props"] 80 | z_index = 2 81 | position = Vector2(-43.0405, -266.451) 82 | texture = ExtResource("15") 83 | 84 | [node name="bush2" type="Sprite2D" parent="props"] 85 | z_index = 2 86 | material = ExtResource("18") 87 | position = Vector2(-75.612, -30.4) 88 | texture = ExtResource("15") 89 | offset = Vector2(0, -15) 90 | 91 | [node name="house" type="Sprite2D" parent="props"] 92 | position = Vector2(58.7934, -83.542) 93 | texture = ExtResource("11") 94 | 95 | [node name="middle" type="Sprite2D" parent="props"] 96 | z_index = -2 97 | position = Vector2(-3.50484, -7.55041) 98 | texture = ExtResource("16") 99 | 100 | [node name="middle2" type="Sprite2D" parent="props/middle"] 101 | z_index = -2 102 | position = Vector2(176, 1.268) 103 | texture = ExtResource("16") 104 | 105 | [node name="middle3" type="Sprite2D" parent="props/middle"] 106 | z_index = -2 107 | position = Vector2(352, 1.268) 108 | texture = ExtResource("16") 109 | 110 | [node name="middle4" type="Sprite2D" parent="props/middle"] 111 | z_index = -2 112 | position = Vector2(-176, 1.268) 113 | texture = ExtResource("16") 114 | 115 | [node name="middle5" type="Sprite2D" parent="props/middle"] 116 | z_index = -2 117 | position = Vector2(-352, 1.268) 118 | texture = ExtResource("16") 119 | 120 | [node name="Player" type="AnimatedSprite2D" parent="."] 121 | z_index = 1 122 | position = Vector2(-24.7046, -47.0862) 123 | sprite_frames = SubResource("1") 124 | frame = 3 125 | 126 | [node name="Camera2D" type="Camera2D" parent="."] 127 | zoom = Vector2(3, 3) 128 | limit_smoothed = true 129 | position_smoothing_speed = 10.0 130 | script = ExtResource("4") 131 | speed = 5.0 132 | target = NodePath("../CamTarget") 133 | 134 | [node name="CamTarget" type="Node2D" parent="."] 135 | 136 | [node name="Water" type="Sprite2D" parent="."] 137 | z_index = 5 138 | material = ExtResource("3") 139 | position = Vector2(0, -21.388) 140 | scale = Vector2(2.6, 0.8) 141 | texture = ExtResource("6") 142 | offset = Vector2(0, 256) 143 | script = ExtResource("5") 144 | cameraPath = NodePath("../Camera2D") 145 | 146 | [node name="ground" parent="." instance=ExtResource("18_j5h7r")] 147 | -------------------------------------------------------------------------------- /GrassSway/grass_sway_mat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://c5m7fu58vrbff"] 2 | 3 | [ext_resource type="Shader" path="res://GrassSway/grass_sway_shader.gdshader" id="1"] 4 | 5 | [resource] 6 | shader = ExtResource("1") 7 | shader_parameter/frequency = 1.0 8 | shader_parameter/amplitude = 0.2 9 | -------------------------------------------------------------------------------- /GrassSway/grass_sway_shader.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float frequency = 1.; 4 | uniform float amplitude = 1.; 5 | 6 | //make sure to set object's offset to be at the bottom 7 | void vertex() 8 | { 9 | float vertPosX = (-VERTEX.y * sin(TIME * frequency) * amplitude) + VERTEX.x; 10 | VERTEX.x = vertPosX; 11 | } -------------------------------------------------------------------------------- /GrassSway/grass_sway_shader.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float frequency = 1.; 4 | uniform float amplitude = 1.; 5 | 6 | //make sure to set object's offset to be at the bottom 7 | void vertex() 8 | { 9 | float vertPosX = (-VERTEX.y * sin(TIME * frequency) * amplitude) + VERTEX.x; 10 | VERTEX.x = vertPosX; 11 | } -------------------------------------------------------------------------------- /ImpactEffectShader/ImpactEffectScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=30 format=3 uid="uid://bcxsb8t2tw8hh"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="1"] 4 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="2"] 5 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="3"] 6 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="4"] 7 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="5"] 8 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="6"] 9 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="7"] 10 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="8"] 11 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="10"] 12 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="11"] 13 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="12"] 14 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="13"] 15 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="14"] 16 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="15"] 17 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="16"] 18 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="17"] 19 | [ext_resource type="Shader" path="res://ImpactEffectShader/impact_effect.gdshader" id="17_03ab6"] 20 | [ext_resource type="Texture2D" uid="uid://3mjuf8jwwfly" path="res://pixel.png" id="18_1vcue"] 21 | [ext_resource type="Texture2D" uid="uid://2a5md77h02ne" path="res://ImpactEffectShader/Waves.png" id="18_4230y"] 22 | [ext_resource type="Script" path="res://ImpactEffectShader/impact_effect_script.gd" id="19"] 23 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="20_lunqh"] 24 | [ext_resource type="Shader" path="res://ImpactEffectShader/impact_effect_procedural.gdshader" id="21_q06a3"] 25 | [ext_resource type="Script" path="res://ImpactEffectShader/impact_effect_procedural.gd" id="22_bgqbk"] 26 | 27 | [sub_resource type="SpriteFrames" id="1"] 28 | animations = [{ 29 | "frames": [{ 30 | "duration": 1.0, 31 | "texture": ExtResource("8") 32 | }, { 33 | "duration": 1.0, 34 | "texture": ExtResource("12") 35 | }, { 36 | "duration": 1.0, 37 | "texture": ExtResource("13") 38 | }, { 39 | "duration": 1.0, 40 | "texture": ExtResource("14") 41 | }], 42 | "loop": true, 43 | "name": &"default", 44 | "speed": 5.0 45 | }] 46 | 47 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_5sviv"] 48 | shader = ExtResource("17_03ab6") 49 | shader_parameter/offsetStrength = 0.5 50 | shader_parameter/noiseTexture = ExtResource("18_4230y") 51 | 52 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_knfoc"] 53 | shader = ExtResource("21_q06a3") 54 | shader_parameter/ringRadius = 0.0 55 | shader_parameter/ringWidth = 0.2 56 | shader_parameter/innerSmoothing = 1.0 57 | shader_parameter/outerSmoothing = 1.0 58 | shader_parameter/distortionStrength = 0.1 59 | shader_parameter/distortionValue = 1.0 60 | 61 | [sub_resource type="Animation" id="Animation_5sk1y"] 62 | length = 0.001 63 | step = 0.01 64 | tracks/0/type = "bezier" 65 | tracks/0/imported = false 66 | tracks/0/enabled = true 67 | tracks/0/path = NodePath(".:material:shader_parameter/distortionValue") 68 | tracks/0/interp = 1 69 | tracks/0/loop_wrap = true 70 | tracks/0/keys = { 71 | "handle_modes": PackedInt32Array(0), 72 | "points": PackedFloat32Array(1, -0.25, 0, 0.25, 0), 73 | "times": PackedFloat32Array(0.001) 74 | } 75 | tracks/1/type = "value" 76 | tracks/1/imported = false 77 | tracks/1/enabled = true 78 | tracks/1/path = NodePath(".:material:shader_parameter/ringRadius") 79 | tracks/1/interp = 1 80 | tracks/1/loop_wrap = true 81 | tracks/1/keys = { 82 | "times": PackedFloat32Array(0.001), 83 | "transitions": PackedFloat32Array(1), 84 | "update": 0, 85 | "values": [0.0] 86 | } 87 | 88 | [sub_resource type="Animation" id="Animation_hvu8e"] 89 | resource_name = "ShowImpact" 90 | step = 0.05 91 | tracks/0/type = "value" 92 | tracks/0/imported = false 93 | tracks/0/enabled = true 94 | tracks/0/path = NodePath(".:material:shader_parameter/ringRadius") 95 | tracks/0/interp = 1 96 | tracks/0/loop_wrap = true 97 | tracks/0/keys = { 98 | "times": PackedFloat32Array(0, 0.95), 99 | "transitions": PackedFloat32Array(1, 1), 100 | "update": 0, 101 | "values": [0.0, 1.0] 102 | } 103 | tracks/1/type = "value" 104 | tracks/1/imported = false 105 | tracks/1/enabled = true 106 | tracks/1/path = NodePath(".:material:shader_parameter/distortionValue") 107 | tracks/1/interp = 1 108 | tracks/1/loop_wrap = true 109 | tracks/1/keys = { 110 | "times": PackedFloat32Array(0, 0.05, 0.4, 0.9), 111 | "transitions": PackedFloat32Array(1, 1, 1, 1), 112 | "update": 0, 113 | "values": [1.0, 1.0, 1.0, 0.0] 114 | } 115 | 116 | [sub_resource type="AnimationLibrary" id="AnimationLibrary_cb2vm"] 117 | _data = { 118 | "RESET": SubResource("Animation_5sk1y"), 119 | "ShowImpact": SubResource("Animation_hvu8e") 120 | } 121 | 122 | [node name="Node2D" type="Node2D"] 123 | texture_filter = 1 124 | 125 | [node name="bg" type="Sprite2D" parent="."] 126 | z_index = -5 127 | position = Vector2(15, -167.395) 128 | scale = Vector2(5, 5) 129 | texture = ExtResource("1") 130 | 131 | [node name="props" type="Node2D" parent="."] 132 | texture_filter = 1 133 | 134 | [node name="tree" type="Sprite2D" parent="props"] 135 | z_index = -2 136 | position = Vector2(-93.8489, -138.933) 137 | texture = ExtResource("2") 138 | 139 | [node name="rock" type="Sprite2D" parent="props"] 140 | z_index = -2 141 | position = Vector2(-47.407, -38.672) 142 | texture = ExtResource("7") 143 | 144 | [node name="rock2" type="Sprite2D" parent="props"] 145 | z_index = -2 146 | position = Vector2(-108.961, -37.7967) 147 | texture = ExtResource("7") 148 | 149 | [node name="shrooms" type="Sprite2D" parent="props"] 150 | z_index = -2 151 | position = Vector2(-114.61, -102.389) 152 | texture = ExtResource("10") 153 | 154 | [node name="shrooms2" type="Sprite2D" parent="props"] 155 | z_index = -2 156 | position = Vector2(-153.721, -102.39) 157 | texture = ExtResource("10") 158 | 159 | [node name="big-crate" type="Sprite2D" parent="props"] 160 | z_index = 1 161 | position = Vector2(-110.983, -44.25) 162 | texture = ExtResource("17") 163 | 164 | [node name="bush" type="Sprite2D" parent="props"] 165 | z_index = 1 166 | position = Vector2(-43.0405, -44.25) 167 | texture = ExtResource("15") 168 | 169 | [node name="house" type="Sprite2D" parent="props"] 170 | z_index = -2 171 | position = Vector2(58.7934, -83.542) 172 | texture = ExtResource("11") 173 | 174 | [node name="Node2D" type="Node2D" parent="props"] 175 | 176 | [node name="middle" type="Sprite2D" parent="props/Node2D"] 177 | z_index = -3 178 | position = Vector2(-3.50484, -7.55041) 179 | texture = ExtResource("16") 180 | 181 | [node name="middle2" type="Sprite2D" parent="props/Node2D"] 182 | z_index = -3 183 | position = Vector2(172.495, -6.28241) 184 | texture = ExtResource("16") 185 | 186 | [node name="middle3" type="Sprite2D" parent="props/Node2D"] 187 | z_index = -3 188 | position = Vector2(348.495, -6.28241) 189 | texture = ExtResource("16") 190 | 191 | [node name="middle4" type="Sprite2D" parent="props/Node2D"] 192 | z_index = -3 193 | position = Vector2(-179.505, -6.28241) 194 | texture = ExtResource("16") 195 | 196 | [node name="middle5" type="Sprite2D" parent="props/Node2D"] 197 | z_index = -3 198 | position = Vector2(-355.505, -6.28241) 199 | texture = ExtResource("16") 200 | 201 | [node name="Player" type="AnimatedSprite2D" parent="."] 202 | z_index = 1 203 | texture_filter = 1 204 | position = Vector2(-24.7046, -47.0862) 205 | sprite_frames = SubResource("1") 206 | frame = 1 207 | 208 | [node name="Camera2D" type="Camera2D" parent="."] 209 | position = Vector2(0, -100) 210 | zoom = Vector2(3, 3) 211 | limit_smoothed = true 212 | position_smoothing_speed = 10.0 213 | script = ExtResource("4") 214 | positionIncrement = 1.0 215 | speed = 5.0 216 | canBeMoved = false 217 | target = NodePath("../CamTarget") 218 | 219 | [node name="CamTarget" type="Node2D" parent="."] 220 | position = Vector2(0, -150) 221 | 222 | [node name="Water" type="Sprite2D" parent="."] 223 | visible = false 224 | modulate = Color(0, 0.619608, 1, 1) 225 | z_index = 5 226 | material = ExtResource("3") 227 | scale = Vector2(1.25064, 0.79958) 228 | texture = ExtResource("6") 229 | offset = Vector2(0, 256) 230 | script = ExtResource("5") 231 | cameraPath = NodePath("../Camera2D") 232 | 233 | [node name="ImpactEffect" type="Sprite2D" parent="."] 234 | z_index = 10 235 | z_as_relative = false 236 | material = SubResource("ShaderMaterial_5sviv") 237 | position = Vector2(-296, -86) 238 | texture = ExtResource("18_1vcue") 239 | script = ExtResource("19") 240 | 241 | [node name="ImpactEffectProcedural" type="Sprite2D" parent="." node_paths=PackedStringArray("animation_player")] 242 | z_index = 10 243 | z_as_relative = false 244 | material = SubResource("ShaderMaterial_knfoc") 245 | position = Vector2(-4, -91) 246 | scale = Vector2(400, 400) 247 | texture = ExtResource("18_1vcue") 248 | script = ExtResource("22_bgqbk") 249 | animation_player = NodePath("AnimationPlayer") 250 | 251 | [node name="AnimationPlayer" type="AnimationPlayer" parent="ImpactEffectProcedural"] 252 | libraries = { 253 | "": SubResource("AnimationLibrary_cb2vm") 254 | } 255 | 256 | [node name="ground" parent="." instance=ExtResource("20_lunqh")] 257 | texture_filter = 1 258 | -------------------------------------------------------------------------------- /ImpactEffectShader/RadialGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/ImpactEffectShader/RadialGradient.png -------------------------------------------------------------------------------- /ImpactEffectShader/RadialGradient.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bck38lfihofjt" 6 | path="res://.godot/imported/RadialGradient.png-a0042118c52987fa19a930efe5159dc2.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://ImpactEffectShader/RadialGradient.png" 14 | dest_files=["res://.godot/imported/RadialGradient.png-a0042118c52987fa19a930efe5159dc2.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /ImpactEffectShader/Waves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/ImpactEffectShader/Waves.png -------------------------------------------------------------------------------- /ImpactEffectShader/Waves.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://2a5md77h02ne" 6 | path="res://.godot/imported/Waves.png-c05db85c253d834abaf84b9e6a2a7db3.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://ImpactEffectShader/Waves.png" 14 | dest_files=["res://.godot/imported/Waves.png-c05db85c253d834abaf84b9e6a2a7db3.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /ImpactEffectShader/impact_effect.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D noiseTexture; 4 | uniform float offsetStrength : hint_range(0, 1); 5 | 6 | uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; 7 | varying vec2 vertPos; 8 | 9 | void vertex() 10 | { 11 | vertPos = normalize(VERTEX); 12 | } 13 | 14 | void fragment() 15 | { 16 | vec2 noiseOffset = texture(noiseTexture, UV).rg; 17 | 18 | noiseOffset *= offsetStrength; 19 | noiseOffset = smoothstep(0.0, 5.0, noiseOffset); 20 | 21 | noiseOffset *= vertPos; 22 | 23 | vec2 screenUV = SCREEN_UV; 24 | screenUV.x += noiseOffset.x; 25 | screenUV.y += noiseOffset.y; 26 | 27 | vec4 color = texture(SCREEN_TEXTURE, screenUV); 28 | color.a = texture(TEXTURE, UV).a; 29 | 30 | COLOR = color; 31 | } -------------------------------------------------------------------------------- /ImpactEffectShader/impact_effect_mat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" format=3 uid="uid://mkuw8e88dndy"] 2 | 3 | [resource] 4 | -------------------------------------------------------------------------------- /ImpactEffectShader/impact_effect_procedural.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var animation_player : AnimationPlayer; 4 | 5 | 6 | func _input(event): 7 | if event is InputEventMouseButton: 8 | if event.button_index == MOUSE_BUTTON_RIGHT and event.pressed: 9 | self.position = get_global_mouse_position(); 10 | animation_player.play("ShowImpact"); 11 | 12 | -------------------------------------------------------------------------------- /ImpactEffectShader/impact_effect_procedural.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float ringRadius : hint_range(0., 1.) = 0.; 4 | uniform float ringWidth = 0.2; 5 | uniform float innerSmoothing : hint_range(0., 1.) = 1.; 6 | uniform float outerSmoothing : hint_range(0., 1.) = 1.; 7 | 8 | uniform float distortionStrength = 0.1; 9 | uniform float distortionValue : hint_range(0, 1) = 1.; 10 | 11 | uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; 12 | 13 | void fragment() 14 | { 15 | vec2 center = UV * 2. - 1.; 16 | 17 | float halfWidth = ringWidth * 0.5; 18 | float centerRadius = ringRadius - halfWidth; 19 | float innerRadius = ringRadius - ringWidth; 20 | float lerpedOuter = clamp(mix(centerRadius, ringRadius, 1.-outerSmoothing), 0, ringRadius); 21 | float outerCircle = 1.-smoothstep(lerpedOuter, ringRadius, length(center)); 22 | 23 | float lerpedCenter = clamp(mix(innerRadius, centerRadius, innerSmoothing), 0, centerRadius); 24 | float innerCircle = smoothstep(innerRadius, lerpedCenter, length(center)); 25 | 26 | float ring = innerCircle * outerCircle; 27 | vec2 noiseOffset = center * ring * distortionStrength * distortionValue; 28 | 29 | vec2 screenUV = SCREEN_UV; 30 | screenUV += noiseOffset; 31 | 32 | vec4 color = vec4(vec3(0.), 1.); 33 | color = texture(SCREEN_TEXTURE, screenUV); 34 | 35 | COLOR = color; 36 | } -------------------------------------------------------------------------------- /ImpactEffectShader/impact_effect_script.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | 4 | # Declare member variables here. Examples: 5 | # var a = 2 6 | # var b = "text" 7 | 8 | @export var power:float = 1; 9 | @export var maxSize:float = 1000; 10 | @export var offsetDecreaseSpeed:float = 0.01; 11 | @export var maxOffsetStrength:float = 0.5; 12 | 13 | 14 | var currentScale = 0; 15 | var currentOffsetStrength = 0; 16 | var expand = false; 17 | var decreaseStrength = false; 18 | 19 | 20 | # Called when the node enters the scene tree for the first time. 21 | func _ready(): 22 | self.scale = Vector2.ZERO; 23 | currentOffsetStrength = maxOffsetStrength; 24 | pass # Replace with function body. 25 | 26 | 27 | # Called every frame. 'delta' is the elapsed time since the previous frame. 28 | func _process(delta): 29 | #self.scale += Vector2.ONE * currentScale; 30 | if(expand): 31 | if(self.scale.x < maxSize): 32 | self.scale += Vector2.ONE * power; 33 | else: 34 | expand = false; 35 | decreaseStrength = true; 36 | if(!expand && decreaseStrength): 37 | currentOffsetStrength -= offsetDecreaseSpeed; 38 | self.material.set_shader_parameter("offsetStrength", currentOffsetStrength); 39 | if(currentOffsetStrength <=0): 40 | _resetObject(); 41 | 42 | pass 43 | 44 | func _input(event): 45 | if event is InputEventMouseButton: 46 | if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: 47 | if(!expand && !decreaseStrength): 48 | self.position = get_global_mouse_position(); 49 | expand = true; 50 | 51 | func _resetObject(): 52 | self.scale = Vector2.ZERO; 53 | currentOffsetStrength = maxOffsetStrength; 54 | self.material.set_shader_parameter("offsetStrength", maxOffsetStrength); 55 | expand = false; 56 | decreaseStrength = false; 57 | pass 58 | -------------------------------------------------------------------------------- /ImpactEffectShader/impact_effect_shader.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D noiseTexture; 4 | uniform float offsetStrength : hint_range(0, 1); 5 | 6 | varying vec2 vertPos; 7 | 8 | void vertex() 9 | { 10 | vertPos = normalize(VERTEX); 11 | } 12 | 13 | void fragment() 14 | { 15 | 16 | vec2 noiseOffset = texture(noiseTexture, UV).rg; 17 | 18 | noiseOffset *= offsetStrength; 19 | noiseOffset = smoothstep(0.0, 5.0, noiseOffset); 20 | 21 | noiseOffset *= vertPos; 22 | 23 | vec2 screenUV = SCREEN_UV; 24 | screenUV.x -= noiseOffset.x; 25 | screenUV.y += noiseOffset.y; 26 | 27 | vec4 color = texture(SCREEN_TEXTURE, screenUV); 28 | color.a = texture(TEXTURE, UV).a; 29 | 30 | COLOR = color; 31 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Serj 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MagnifyingGlass/MagnifyingGlassScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=23 format=3 uid="uid://ch20bdm5sk8a5"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="1_2imaq"] 4 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="2"] 5 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="3"] 6 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="4"] 7 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="5"] 8 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="6"] 9 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="7"] 10 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="8"] 11 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="9"] 12 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="10"] 13 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="11"] 14 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="12"] 15 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="13"] 16 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="14"] 17 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="16"] 18 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="17"] 19 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="18"] 20 | [ext_resource type="Material" uid="uid://g0gq7rg0ad3w" path="res://MagnifyingGlass/magnifying_glass_mat.tres" id="19"] 21 | [ext_resource type="Texture2D" uid="uid://3mjuf8jwwfly" path="res://pixel.png" id="19_pivgm"] 22 | [ext_resource type="Script" path="res://MagnifyingGlass/magnifying_glass_script.gd" id="20"] 23 | [ext_resource type="Texture2D" uid="uid://bw0rxi6e1ygj6" path="res://MagnifyingGlass/magnifying_glass_outline.png" id="21"] 24 | 25 | [sub_resource type="SpriteFrames" id="1"] 26 | animations = [{ 27 | "frames": [{ 28 | "duration": 1.0, 29 | "texture": ExtResource("7") 30 | }, { 31 | "duration": 1.0, 32 | "texture": ExtResource("9") 33 | }, { 34 | "duration": 1.0, 35 | "texture": ExtResource("10") 36 | }, { 37 | "duration": 1.0, 38 | "texture": ExtResource("11") 39 | }], 40 | "loop": true, 41 | "name": &"default", 42 | "speed": 5.0 43 | }] 44 | 45 | [node name="Node2D" type="Node2D"] 46 | 47 | [node name="ground" parent="." instance=ExtResource("1_2imaq")] 48 | 49 | [node name="bg" type="Sprite2D" parent="."] 50 | visible = false 51 | z_index = -5 52 | position = Vector2(15, -167.395) 53 | scale = Vector2(5, 5) 54 | texture = ExtResource("3") 55 | 56 | [node name="props" type="Node2D" parent="."] 57 | 58 | [node name="tree" type="Sprite2D" parent="props"] 59 | z_index = -2 60 | position = Vector2(-93.8489, -138.933) 61 | texture = ExtResource("4") 62 | 63 | [node name="rock" type="Sprite2D" parent="props"] 64 | z_index = -2 65 | position = Vector2(-47.407, -38.672) 66 | texture = ExtResource("6") 67 | 68 | [node name="rock2" type="Sprite2D" parent="props"] 69 | z_index = -2 70 | position = Vector2(-108.961, -37.7967) 71 | texture = ExtResource("6") 72 | 73 | [node name="shrooms" type="Sprite2D" parent="props"] 74 | z_index = -2 75 | position = Vector2(-114.61, -102.389) 76 | texture = ExtResource("2") 77 | 78 | [node name="shrooms2" type="Sprite2D" parent="props"] 79 | z_index = -2 80 | position = Vector2(-153.721, -102.39) 81 | texture = ExtResource("2") 82 | 83 | [node name="big-crate" type="Sprite2D" parent="props"] 84 | z_index = -2 85 | position = Vector2(-110.983, -270.636) 86 | texture = ExtResource("14") 87 | 88 | [node name="bush" type="Sprite2D" parent="props"] 89 | z_index = -2 90 | position = Vector2(-43.0405, -266.451) 91 | texture = ExtResource("12") 92 | 93 | [node name="house" type="Sprite2D" parent="props"] 94 | z_index = -2 95 | position = Vector2(58.7934, -83.542) 96 | texture = ExtResource("8") 97 | 98 | [node name="Node2D" type="Node2D" parent="props"] 99 | 100 | [node name="middle" type="Sprite2D" parent="props/Node2D"] 101 | z_index = -3 102 | position = Vector2(-3.50484, -7.55041) 103 | texture = ExtResource("13") 104 | 105 | [node name="middle2" type="Sprite2D" parent="props/Node2D"] 106 | z_index = -3 107 | position = Vector2(172.495, -6.28241) 108 | texture = ExtResource("13") 109 | 110 | [node name="middle3" type="Sprite2D" parent="props/Node2D"] 111 | z_index = -3 112 | position = Vector2(348.495, -6.28241) 113 | texture = ExtResource("13") 114 | 115 | [node name="middle4" type="Sprite2D" parent="props/Node2D"] 116 | z_index = -3 117 | position = Vector2(-179.505, -6.28241) 118 | texture = ExtResource("13") 119 | 120 | [node name="middle5" type="Sprite2D" parent="props/Node2D"] 121 | z_index = -3 122 | position = Vector2(-355.505, -6.28241) 123 | texture = ExtResource("13") 124 | 125 | [node name="Player" type="AnimatedSprite2D" parent="."] 126 | z_index = 5 127 | position = Vector2(-21.8437, -47.9965) 128 | sprite_frames = SubResource("1") 129 | frame = 1 130 | 131 | [node name="Player2" type="AnimatedSprite2D" parent="."] 132 | visible = false 133 | z_index = 1 134 | scale = Vector2(5, 5) 135 | sprite_frames = SubResource("1") 136 | frame = 1 137 | 138 | [node name="Camera2D" type="Camera2D" parent="."] 139 | position = Vector2(0, -60) 140 | zoom = Vector2(3, 3) 141 | limit_smoothed = true 142 | position_smoothing_speed = 10.0 143 | script = ExtResource("18") 144 | positionIncrement = 1.0 145 | speed = 5.0 146 | canBeMoved = false 147 | canZoom = false 148 | target = NodePath("../CamTarget") 149 | 150 | [node name="CamTarget" type="Node2D" parent="."] 151 | visible = false 152 | position = Vector2(0, -150) 153 | 154 | [node name="Water" type="Sprite2D" parent="."] 155 | z_index = 5 156 | material = ExtResource("16") 157 | scale = Vector2(2.033, 0.8) 158 | texture = ExtResource("5") 159 | offset = Vector2(0, 256) 160 | script = ExtResource("17") 161 | cameraPath = NodePath("../Camera2D") 162 | 163 | [node name="CanvasLayer" type="CanvasLayer" parent="."] 164 | 165 | [node name="MagnifyingGlass" type="Sprite2D" parent="CanvasLayer"] 166 | z_index = 6 167 | z_as_relative = false 168 | material = ExtResource("19") 169 | position = Vector2(79, -61) 170 | scale = Vector2(154, 154) 171 | texture = ExtResource("19_pivgm") 172 | script = ExtResource("20") 173 | camera = NodePath("../../Camera2D") 174 | zoom = 0.0 175 | zoomIncrement = 0.1 176 | 177 | [node name="MagnifyingGlass2" type="Sprite2D" parent="CanvasLayer/MagnifyingGlass"] 178 | modulate = Color(0, 0, 0, 1) 179 | z_index = 6 180 | z_as_relative = false 181 | position = Vector2(-5.96046e-08, 2.98023e-08) 182 | scale = Vector2(0.00194805, 0.00194805) 183 | texture = ExtResource("21") 184 | -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float edgeDistortionStrength = 0; 4 | uniform vec2 tiling = vec2(1,1); // is changed through code 5 | uniform vec2 offset = vec2(0,0); // is changed through code 6 | uniform float distortionSize : hint_range(0., 1.); 7 | uniform float smoothingOuter : hint_range(0., 1.); 8 | uniform float smoothingInner : hint_range(0., 1.); 9 | 10 | uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; 11 | varying vec2 vertPos; 12 | 13 | float remap(float from1, float to1, float from2, float to2, float value) 14 | { 15 | return (value - from1) / (to1 - from1) * (to2 - from2) + from2; 16 | } 17 | 18 | void vertex() 19 | { 20 | vertPos = VERTEX; 21 | } 22 | 23 | void fragment() 24 | { 25 | vec4 distortionOffset = vec4(1.); 26 | 27 | vec2 center = UV * 2. - 1.; 28 | 29 | float outerCircle = 1.-smoothstep(1.-smoothingOuter, 1., length(center)); 30 | float smoothing = remap(0., 1., 1. - distortionSize, 1., smoothingInner); 31 | float innerCircle = smoothstep(1.-distortionSize, smoothing, length(center)); 32 | float difference = outerCircle * innerCircle; 33 | distortionOffset.rgb *= difference; 34 | 35 | distortionOffset.rg *= vertPos * TEXTURE_PIXEL_SIZE; 36 | distortionOffset.rgb *= edgeDistortionStrength; 37 | 38 | vec2 originalUV = SCREEN_UV * tiling + offset; 39 | originalUV -= distortionOffset.rg; 40 | vec4 color = texture(SCREEN_TEXTURE, originalUV); 41 | color.a = step(length(center), 1.); 42 | 43 | COLOR = color; 44 | } 45 | -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D gradientTexture; 4 | uniform float edgeDistortionStrength = 0; 5 | uniform vec2 tiling = vec2(1,1); // is changed through code 6 | uniform vec2 offset = vec2(0,0); // is changed through code 7 | 8 | varying vec2 vertPos; 9 | 10 | void vertex() 11 | { 12 | vertPos = VERTEX; 13 | } 14 | 15 | void fragment() 16 | { 17 | vec4 distortionOffset = texture(gradientTexture, UV); 18 | 19 | distortionOffset.rg *= vertPos * TEXTURE_PIXEL_SIZE; 20 | distortionOffset *= edgeDistortionStrength; 21 | 22 | vec2 originalUV = SCREEN_UV; 23 | originalUV = originalUV * tiling + offset; 24 | originalUV.x -= distortionOffset.r; 25 | originalUV.y += distortionOffset.g; 26 | 27 | vec4 color = texture(SCREEN_TEXTURE, originalUV); 28 | 29 | color.a = texture(TEXTURE, UV).a; 30 | 31 | COLOR = color; 32 | } -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass_distortion_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/MagnifyingGlass/magnifying_glass_distortion_gradient.png -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass_distortion_gradient.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bbyjxjnoygdun" 6 | path="res://.godot/imported/magnifying_glass_distortion_gradient.png-7e21ab1cbb771614cec5bd96027a6eb2.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://MagnifyingGlass/magnifying_glass_distortion_gradient.png" 14 | dest_files=["res://.godot/imported/magnifying_glass_distortion_gradient.png-7e21ab1cbb771614cec5bd96027a6eb2.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass_mat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://g0gq7rg0ad3w"] 2 | 3 | [ext_resource type="Shader" path="res://MagnifyingGlass/magnifying_glass.gdshader" id="1"] 4 | 5 | [resource] 6 | shader = ExtResource("1") 7 | shader_parameter/edgeDistortionStrength = 0.1 8 | shader_parameter/tiling = Vector2(1, 1) 9 | shader_parameter/offset = Vector2(0, 0) 10 | shader_parameter/distortionSize = 0.29 11 | shader_parameter/smoothingOuter = 0.147 12 | shader_parameter/smoothingInner = 1.0 13 | -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/MagnifyingGlass/magnifying_glass_outline.png -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass_outline.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bw0rxi6e1ygj6" 6 | path="res://.godot/imported/magnifying_glass_outline.png-450decbeff078a9ddb320c01fcf6b9bf.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://MagnifyingGlass/magnifying_glass_outline.png" 14 | dest_files=["res://.godot/imported/magnifying_glass_outline.png-450decbeff078a9ddb320c01fcf6b9bf.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /MagnifyingGlass/magnifying_glass_script.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | 4 | # Declare member variables here. Examples: 5 | # var a = 2 6 | # var b = "text" 7 | 8 | @export var camera: NodePath; 9 | 10 | @export var zoom: float = 0.1; 11 | @export var zoomIncrement: float; 12 | @export var control: bool = true; 13 | 14 | var xOffset; 15 | var yOffset; 16 | 17 | var screenWidth; 18 | var screenHeight; 19 | 20 | # Called when the node enters the scene tree for the first time. 21 | func _ready(): 22 | screenWidth = ProjectSettings.get_setting("display/window/size/viewport_width"); 23 | screenHeight = ProjectSettings.get_setting("display/window/size/viewport_height"); 24 | pass # Replace with function body. 25 | 26 | 27 | # Called every frame. 'delta' is the elapsed time since the previous frame. 28 | func _process(delta): 29 | 30 | xOffset = zoom * self.get_global_transform_with_canvas().origin.x/screenWidth; 31 | yOffset = zoom * self.get_global_transform_with_canvas().origin.y/screenHeight; 32 | 33 | #print(self.get_global_transform_with_canvas().origin.y); 34 | 35 | var tiling = Vector2(1 - zoom, 1 - zoom); 36 | var offset = Vector2(xOffset, yOffset); 37 | 38 | 39 | self.material.set_shader_parameter("offset", offset); 40 | self.material.set_shader_parameter("tiling", tiling); 41 | if(control): 42 | self.position = get_global_mouse_position(); 43 | 44 | func _input(event): 45 | if(Input.is_mouse_button_pressed(4)): #wheel up 46 | zoom += zoomIncrement; 47 | if(Input.is_mouse_button_pressed(5)): #wheel down 48 | zoom -= zoomIncrement; 49 | if(Input.is_action_just_pressed("test")): 50 | var tiling = Vector2(1 - zoom, 1 - zoom); 51 | var offset = Vector2(xOffset, yOffset); 52 | print("tiling = "); 53 | print(tiling); 54 | print("offset = "); 55 | print(offset); 56 | print("zoom = "); 57 | print(zoom); 58 | print("self.get_global_transform_with_canvas().origin.x"); 59 | print(self.get_global_transform_with_canvas().origin.x); 60 | print("screenWidth"); 61 | print(screenWidth); 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Godot shaders 2 | 3 | A collection of shaders that I wrote in Unity converted to be used in Godot. 4 | 5 | Godot version 4.2 6 | Shaders for version 3.2.1 can be found [here](https://github.com/gamedevserj/Godot-Shaders/releases/tag/Shaders-for-Godot-version-3.2.1) 7 | 8 | ## Reflective water 9 | 10 | 11 | 12 | This shader uses SCREEN_TEXTURE to display reflective image to simulate water. Just like the one in Unity it has some limitations. 13 | 14 | Reflection is calculated using object's position, which means if you want to have reflection from top of the object then you need to set Y axis offset to half its height. Visible height of the water object can not exceed the distance to the top of the screen. 15 | 16 | Adjustable parameters: 17 | Reflection offset 18 | Reflection blur(1) 19 | Distortion 20 | Waves 21 | Shoreline 22 | Shoreline foam 23 | 24 | (1) Reflection blur is only available when project's dirver is set to GLES3, which might break effect stacking (eg. impact effect might completely remove water). A way to deal with this is described [here](https://docs.godotengine.org/ru/stable/tutorials/shading/screen-reading_shaders.html). 25 | 26 | Here's an example of the limitations. 27 | 28 | 29 | 30 | In the first image the water starts from the bottom of the screen and goes up to the middle. Which means its visible height is equal to the distance to the top of the screen. In the second image camera is moved lower, which results in water height being greater than the distance to the top. In the third image the water is way higher than the middle of the screen, but its height is smaller that the distance to the top, so reflections work properly. 31 | Examples 2 and 3 do not feature reflections squashing, squashing the reflection results in a greater area being reflected which means that object's visible height must be smaller. 32 | 33 | The scene contains a script that allows camera to move(WASD keys) and zoom(mouse scroll). 34 | 35 | ## Impact effect/shockwave 36 | 37 | 38 | 39 | Impact effect similar to the one produced by a shockwave during explosion. Can be used as a magic spell, terrain deformation effect. 40 | 41 | Uses SCREEN_TEXTURE and offsets color using the circular gradient noise as a guide. 42 | 43 | Click anywhere in the demo scene to produce the effect. 44 | 45 | ## Dissolve 46 | 47 | 48 | 49 | Dissolves the image using the noise as a guide. 50 | 51 | Left click in the demo scene to dissolve sprite, right click to undo. 52 | 53 | ## Magnifying glass 54 | 55 | 56 | 57 | Magnifying glass effect. The script uses get_global_transform_with_canvas() to set the correct offset for the current position. When testing it on monitor with 1920x1080 resolution the magnification didn't work correctly if the display height was set above 850 and game window had border enabled. Without window border everything worked perfectly. 58 | 59 | Changing edge distortion strength to positive/negative values results in simulating glass being concave/convex. 60 | 61 | Use mouse wheel to zoom in/out. 62 | 63 | ## Stealth cloak effect 64 | 65 | 66 | 67 | Essentially this is a dissolve effect, that overlays one texture over another instead of simply changing the alpha. 68 | 69 | 70 | 71 | ## Grass sway effect 72 | 73 | 74 | 75 | A basic grass sway effect that modifies vertex positions to skew the object. In order for the effect to work properly modify offset to make object's origin to be at the bottom. 76 | 77 | ## Circular fade out 78 | 79 | 80 | Fades out to any point of the screen. 81 | -------------------------------------------------------------------------------- /RingShader/RingShaderScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=22 format=3 uid="uid://bckvaixxg86te"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="1_ip7qr"] 4 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="2_jtdhu"] 5 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="3_e2uun"] 6 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="4_aef6j"] 7 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="5_ygbst"] 8 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="6_fsp3d"] 9 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="7_xqyvo"] 10 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="8_gp56s"] 11 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="9_fmbye"] 12 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="10_grdut"] 13 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="11_llyvj"] 14 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="12_n5tco"] 15 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="13_xn6xs"] 16 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="14_nbv3r"] 17 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="15_skmma"] 18 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="16_weorx"] 19 | [ext_resource type="Shader" path="res://RingShader/ring.gdshader" id="17_38tm0"] 20 | [ext_resource type="Texture2D" uid="uid://3mjuf8jwwfly" path="res://pixel.png" id="18_1ut3k"] 21 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="21_uiak0"] 22 | 23 | [sub_resource type="SpriteFrames" id="1"] 24 | animations = [{ 25 | "frames": [{ 26 | "duration": 1.0, 27 | "texture": ExtResource("9_fmbye") 28 | }, { 29 | "duration": 1.0, 30 | "texture": ExtResource("10_grdut") 31 | }, { 32 | "duration": 1.0, 33 | "texture": ExtResource("11_llyvj") 34 | }, { 35 | "duration": 1.0, 36 | "texture": ExtResource("12_n5tco") 37 | }], 38 | "loop": true, 39 | "name": &"default", 40 | "speed": 5.0 41 | }] 42 | 43 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_tkqeh"] 44 | shader = ExtResource("17_38tm0") 45 | shader_parameter/ringColor = Color(0.141176, 0.427451, 1, 1) 46 | shader_parameter/ringRadius = 1.0 47 | shader_parameter/ringWidth = 0.2 48 | shader_parameter/innerSmoothing = 0.2 49 | shader_parameter/outerSmoothing = 0.2 50 | 51 | [node name="Node2D" type="Node2D"] 52 | 53 | [node name="bg" type="Sprite2D" parent="."] 54 | z_index = -5 55 | position = Vector2(15, -167.395) 56 | scale = Vector2(5, 5) 57 | texture = ExtResource("1_ip7qr") 58 | 59 | [node name="props" type="Node2D" parent="."] 60 | 61 | [node name="tree" type="Sprite2D" parent="props"] 62 | z_index = -2 63 | position = Vector2(-93.8489, -138.933) 64 | texture = ExtResource("2_jtdhu") 65 | 66 | [node name="rock" type="Sprite2D" parent="props"] 67 | z_index = -2 68 | position = Vector2(-47.407, -38.672) 69 | texture = ExtResource("3_e2uun") 70 | 71 | [node name="rock2" type="Sprite2D" parent="props"] 72 | z_index = -2 73 | position = Vector2(-108.961, -37.7967) 74 | texture = ExtResource("3_e2uun") 75 | 76 | [node name="shrooms" type="Sprite2D" parent="props"] 77 | z_index = -2 78 | position = Vector2(-114.61, -102.389) 79 | texture = ExtResource("4_aef6j") 80 | 81 | [node name="shrooms2" type="Sprite2D" parent="props"] 82 | z_index = -2 83 | position = Vector2(-153.721, -102.39) 84 | texture = ExtResource("4_aef6j") 85 | 86 | [node name="big-crate" type="Sprite2D" parent="props"] 87 | z_index = 1 88 | position = Vector2(-110.983, -44.25) 89 | texture = ExtResource("5_ygbst") 90 | 91 | [node name="bush" type="Sprite2D" parent="props"] 92 | z_index = 1 93 | position = Vector2(-43.0405, -44.25) 94 | texture = ExtResource("6_fsp3d") 95 | 96 | [node name="house" type="Sprite2D" parent="props"] 97 | z_index = -2 98 | position = Vector2(58.7934, -83.542) 99 | texture = ExtResource("7_xqyvo") 100 | 101 | [node name="Node2D" type="Node2D" parent="props"] 102 | 103 | [node name="middle" type="Sprite2D" parent="props/Node2D"] 104 | z_index = -3 105 | position = Vector2(-3.50484, -7.55041) 106 | texture = ExtResource("8_gp56s") 107 | 108 | [node name="middle2" type="Sprite2D" parent="props/Node2D"] 109 | z_index = -3 110 | position = Vector2(172.495, -6.28241) 111 | texture = ExtResource("8_gp56s") 112 | 113 | [node name="middle3" type="Sprite2D" parent="props/Node2D"] 114 | z_index = -3 115 | position = Vector2(348.495, -6.28241) 116 | texture = ExtResource("8_gp56s") 117 | 118 | [node name="middle4" type="Sprite2D" parent="props/Node2D"] 119 | z_index = -3 120 | position = Vector2(-179.505, -6.28241) 121 | texture = ExtResource("8_gp56s") 122 | 123 | [node name="middle5" type="Sprite2D" parent="props/Node2D"] 124 | z_index = -3 125 | position = Vector2(-355.505, -6.28241) 126 | texture = ExtResource("8_gp56s") 127 | 128 | [node name="Player" type="AnimatedSprite2D" parent="."] 129 | z_index = 1 130 | position = Vector2(-24.7046, -47.0862) 131 | sprite_frames = SubResource("1") 132 | frame = 1 133 | 134 | [node name="Camera2D" type="Camera2D" parent="."] 135 | position = Vector2(0, -150) 136 | limit_smoothed = true 137 | position_smoothing_speed = 10.0 138 | script = ExtResource("13_xn6xs") 139 | positionIncrement = 1.0 140 | speed = 5.0 141 | canBeMoved = false 142 | target = NodePath("../CamTarget") 143 | 144 | [node name="CamTarget" type="Node2D" parent="."] 145 | position = Vector2(0, -150) 146 | 147 | [node name="Water" type="Sprite2D" parent="."] 148 | visible = false 149 | modulate = Color(0, 0.619608, 1, 1) 150 | z_index = 5 151 | material = ExtResource("14_nbv3r") 152 | scale = Vector2(1.25064, 0.79958) 153 | texture = ExtResource("15_skmma") 154 | offset = Vector2(0, 256) 155 | script = ExtResource("16_weorx") 156 | cameraPath = NodePath("../Camera2D") 157 | 158 | [node name="Ring" type="Sprite2D" parent="."] 159 | z_index = 6 160 | z_as_relative = false 161 | material = SubResource("ShaderMaterial_tkqeh") 162 | position = Vector2(69, -72) 163 | scale = Vector2(150, 150) 164 | texture = ExtResource("18_1ut3k") 165 | 166 | [node name="ground" parent="." instance=ExtResource("21_uiak0")] 167 | -------------------------------------------------------------------------------- /RingShader/ring.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform vec4 ringColor : source_color = vec4(1.); 4 | 5 | uniform float ringRadius : hint_range(0., 1.); 6 | uniform float ringWidth = 0.2; 7 | uniform float innerSmoothing : hint_range(0., 1.) = 1.; 8 | uniform float outerSmoothing : hint_range(0., 1.) = 1.; 9 | 10 | void fragment() 11 | { 12 | vec2 center = UV * 2. - 1.; 13 | 14 | float halfWidth = ringWidth * 0.5; 15 | float centerRadius = ringRadius - halfWidth; 16 | float innerRadius = ringRadius - ringWidth; 17 | float lerpedOuter = clamp(mix(centerRadius, ringRadius, 1.-outerSmoothing), 0, ringRadius); 18 | float outerCircle = 1.-smoothstep(lerpedOuter, ringRadius, length(center)); 19 | 20 | float lerpedCenter = clamp(mix(innerRadius, centerRadius, innerSmoothing), 0, centerRadius); 21 | float innerCircle = smoothstep(innerRadius, lerpedCenter, length(center)); 22 | 23 | float ring = innerCircle * outerCircle; 24 | vec4 color = vec4(ringColor.rgb, ring); 25 | 26 | COLOR = color; 27 | } -------------------------------------------------------------------------------- /StealthCloakEffect/StealthCloakEffectScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=21 format=3 uid="uid://bpnmkd26ea6e0"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="2"] 4 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="3"] 5 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="4"] 6 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="5"] 7 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="6"] 8 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="7"] 9 | [ext_resource type="Material" uid="uid://ri4nsbdoj3w5" path="res://StealthCloakEffect/stealth_cloak_effect_mat.tres" id="8"] 10 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="9"] 11 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="10"] 12 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="11"] 13 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="12"] 14 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="13"] 15 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="14"] 16 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="15"] 17 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="16"] 18 | [ext_resource type="Script" path="res://Dissolve/dissolve_script.gd" id="17"] 19 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="19"] 20 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="19_ix7k0"] 21 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="20"] 22 | 23 | [sub_resource type="SpriteFrames" id="1"] 24 | animations = [{ 25 | "frames": [{ 26 | "duration": 1.0, 27 | "texture": ExtResource("15") 28 | }, { 29 | "duration": 1.0, 30 | "texture": ExtResource("11") 31 | }, { 32 | "duration": 1.0, 33 | "texture": ExtResource("9") 34 | }, { 35 | "duration": 1.0, 36 | "texture": ExtResource("14") 37 | }], 38 | "loop": true, 39 | "name": &"default", 40 | "speed": 5.0 41 | }] 42 | 43 | [node name="Node2D" type="Node2D"] 44 | 45 | [node name="bg" type="Sprite2D" parent="."] 46 | z_index = -5 47 | position = Vector2(15, -167.395) 48 | scale = Vector2(5, 5) 49 | texture = ExtResource("2") 50 | 51 | [node name="props" type="Node2D" parent="."] 52 | 53 | [node name="tree" type="Sprite2D" parent="props"] 54 | z_index = -2 55 | position = Vector2(-93.8489, -138.933) 56 | texture = ExtResource("4") 57 | 58 | [node name="rock" type="Sprite2D" parent="props"] 59 | z_index = -2 60 | position = Vector2(-47.407, -38.672) 61 | texture = ExtResource("5") 62 | 63 | [node name="rock2" type="Sprite2D" parent="props"] 64 | z_index = -2 65 | position = Vector2(-108.961, -37.7967) 66 | texture = ExtResource("5") 67 | 68 | [node name="shrooms" type="Sprite2D" parent="props"] 69 | z_index = -2 70 | position = Vector2(-114.61, -102.389) 71 | texture = ExtResource("13") 72 | 73 | [node name="shrooms2" type="Sprite2D" parent="props"] 74 | z_index = -2 75 | position = Vector2(-153.721, -102.39) 76 | texture = ExtResource("13") 77 | 78 | [node name="big-crate" type="Sprite2D" parent="props"] 79 | z_index = -2 80 | position = Vector2(-110.983, -270.636) 81 | texture = ExtResource("12") 82 | 83 | [node name="bush" type="Sprite2D" parent="props"] 84 | z_index = -2 85 | position = Vector2(-43.0405, -266.451) 86 | texture = ExtResource("10") 87 | 88 | [node name="house" type="Sprite2D" parent="props"] 89 | z_index = -2 90 | position = Vector2(51.684, -85.842) 91 | texture = ExtResource("6") 92 | 93 | [node name="Node2D" type="Node2D" parent="props"] 94 | 95 | [node name="middle" type="Sprite2D" parent="props/Node2D"] 96 | z_index = -3 97 | position = Vector2(-3.50484, -7.55041) 98 | texture = ExtResource("7") 99 | 100 | [node name="middle2" type="Sprite2D" parent="props/Node2D"] 101 | z_index = -3 102 | position = Vector2(172.495, -6.28241) 103 | texture = ExtResource("7") 104 | 105 | [node name="middle3" type="Sprite2D" parent="props/Node2D"] 106 | z_index = -3 107 | position = Vector2(348.495, -6.28241) 108 | texture = ExtResource("7") 109 | 110 | [node name="middle4" type="Sprite2D" parent="props/Node2D"] 111 | z_index = -3 112 | position = Vector2(-179.505, -6.28241) 113 | texture = ExtResource("7") 114 | 115 | [node name="middle5" type="Sprite2D" parent="props/Node2D"] 116 | z_index = -3 117 | position = Vector2(-355.505, -6.28241) 118 | texture = ExtResource("7") 119 | 120 | [node name="Player" type="AnimatedSprite2D" parent="."] 121 | z_index = 3 122 | material = ExtResource("8") 123 | position = Vector2(27.58, -48.397) 124 | sprite_frames = SubResource("1") 125 | frame = 3 126 | script = ExtResource("17") 127 | 128 | [node name="Camera2D" type="Camera2D" parent="."] 129 | position = Vector2(0, -60) 130 | zoom = Vector2(3, 3) 131 | limit_smoothed = true 132 | position_smoothing_speed = 10.0 133 | script = ExtResource("19") 134 | positionIncrement = 1.0 135 | target = NodePath("../CamTarget") 136 | 137 | [node name="CamTarget" type="Node2D" parent="."] 138 | position = Vector2(0, -60) 139 | 140 | [node name="Water" type="Sprite2D" parent="."] 141 | modulate = Color(0, 0.619608, 1, 1) 142 | z_index = 5 143 | material = ExtResource("16") 144 | position = Vector2(0, -24.255) 145 | scale = Vector2(2.151, 0.8) 146 | texture = ExtResource("3") 147 | offset = Vector2(0, 256) 148 | script = ExtResource("20") 149 | cameraPath = NodePath("../Camera2D") 150 | 151 | [node name="ground" parent="." instance=ExtResource("19_ix7k0")] 152 | -------------------------------------------------------------------------------- /StealthCloakEffect/stealth_cloak_effect.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D dissolveNoiseTexture : repeat_enable; 4 | uniform float dissolveNoiseScale = 1; 5 | uniform float dissolveAmount : hint_range(0, 1); 6 | uniform float edgeThickness = 0.01; 7 | uniform vec4 edgeColor : source_color; 8 | uniform vec4 invisibilityTint : source_color; 9 | uniform float tintStrength : hint_range(0., 1.); 10 | 11 | uniform sampler2D distortionNoiseTexture : repeat_enable; 12 | uniform vec2 distortionTiling = vec2(1., 1.); 13 | uniform vec2 distortionSpeed = vec2(1., 1.); 14 | uniform float distortionStrength : hint_range(0., 1.); 15 | 16 | uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; 17 | 18 | void fragment() 19 | { 20 | vec4 originalTexture = texture(TEXTURE, UV); 21 | vec4 dissolveNoise = texture(dissolveNoiseTexture, UV * dissolveNoiseScale); 22 | 23 | vec4 step1 = step(dissolveAmount, dissolveNoise); // step function turns all values in the noise texture below dissolve amount to black and above to white 24 | vec4 step2 = step(dissolveAmount + edgeThickness, dissolveNoise); 25 | 26 | vec4 edge = step1 - step2; // difference between results of two step functions is the edge area 27 | vec4 edgeColorArea = edge * edgeColor; // setting the edge's color 28 | edgeColorArea.a = originalTexture.a; // setting the colored parts that are outside of the original texture to be transparent 29 | 30 | vec2 distortionNoiseOffset = texture(distortionNoiseTexture, UV * distortionTiling + TIME * distortionSpeed).rg; 31 | distortionNoiseOffset *= distortionStrength; 32 | 33 | vec4 screenTexture = texture(SCREEN_TEXTURE, SCREEN_UV + distortionNoiseOffset.rg); 34 | screenTexture.rgb = mix(screenTexture.rgb, invisibilityTint.rgb, tintStrength); 35 | vec4 invertedStep1 = 1.- step1; //white color from step1 is now black and vice versa 36 | 37 | vec4 originalAndEdge = mix(originalTexture, edgeColorArea, edge.r); // combinig original colors with borders 38 | vec4 combined = mix(originalAndEdge, screenTexture, invertedStep1);// using inverted step1 to combine original dissolved image with invisible part 39 | 40 | COLOR = combined; 41 | } -------------------------------------------------------------------------------- /StealthCloakEffect/stealth_cloak_effect.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform sampler2D dissolveNoiseTexture; 4 | uniform float noiseScale = 2; 5 | uniform float dissolveAmount : hint_range(0, 1); 6 | uniform float edgeThickness = 0.01; 7 | uniform vec4 edgeColor : hint_color; 8 | uniform vec4 invisibilityTint : hint_color; 9 | 10 | uniform sampler2D distortionNoiseTexture; 11 | uniform vec2 distortionTiling = vec2(1., 1.); 12 | uniform vec2 distortionSpeed = vec2(1., 1.); 13 | uniform float distortionStrength = 0.1; 14 | 15 | void fragment() 16 | { 17 | vec4 originalTexture = texture(TEXTURE, UV); 18 | vec2 noiseTextureUV = UV * noiseScale; 19 | 20 | vec4 dissolveNoise = texture(dissolveNoiseTexture, noiseTextureUV); 21 | 22 | vec4 step1 = step(dissolveAmount, dissolveNoise); // step function turns all values in the noise texture below dissolve amount to black and above to white 23 | vec4 step2 = step(dissolveAmount + edgeThickness, dissolveNoise); 24 | 25 | vec4 edge = step1 - step2; // difference between results of two step functions is the edge area 26 | vec4 edgeColorArea = edge * edgeColor; // setting the edge's color 27 | 28 | edgeColorArea.a = originalTexture.a; // setting the colored parts that are outside of the original texture to be transparent 29 | 30 | vec2 distortionTextureUV = UV * distortionTiling + TIME*distortionSpeed; 31 | vec2 distortionNoiseOffset = texture(distortionNoiseTexture, distortionTextureUV).rg * distortionStrength; 32 | 33 | distortionNoiseOffset = smoothstep(vec2(0.1), vec2(1.,1.), distortionNoiseOffset); 34 | 35 | vec4 screenTexture = texture(SCREEN_TEXTURE, SCREEN_UV + distortionNoiseOffset); 36 | screenTexture += invisibilityTint; 37 | vec4 invertedStep1 = 1.- step1; //white color from step1 is now black and vice versa 38 | 39 | vec4 originalAndEdge = mix(originalTexture, edgeColorArea, edge.r); // combinig original colors with borders 40 | vec4 combined = mix(originalAndEdge, screenTexture, invertedStep1);// using inverted step1 to combine original dissolved image with invisible part 41 | 42 | COLOR = combined; 43 | } -------------------------------------------------------------------------------- /StealthCloakEffect/stealth_cloak_effect_mat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=6 format=3 uid="uid://ri4nsbdoj3w5"] 2 | 3 | [ext_resource type="Shader" path="res://StealthCloakEffect/stealth_cloak_effect.gdshader" id="1"] 4 | 5 | [sub_resource type="FastNoiseLite" id="1"] 6 | 7 | [sub_resource type="NoiseTexture2D" id="2"] 8 | seamless = true 9 | noise = SubResource("1") 10 | 11 | [sub_resource type="FastNoiseLite" id="3"] 12 | 13 | [sub_resource type="NoiseTexture2D" id="4"] 14 | seamless = true 15 | noise = SubResource("3") 16 | 17 | [resource] 18 | shader = ExtResource("1") 19 | shader_parameter/dissolveNoiseScale = 1.0 20 | shader_parameter/dissolveAmount = 0.0 21 | shader_parameter/edgeThickness = 0.03 22 | shader_parameter/edgeColor = Color(0, 1, 0.0156863, 1) 23 | shader_parameter/invisibilityTint = Color(0.388235, 0.407843, 1, 1) 24 | shader_parameter/tintStrength = 0.391 25 | shader_parameter/distortionTiling = Vector2(1, 1) 26 | shader_parameter/distortionSpeed = Vector2(1, 0) 27 | shader_parameter/distortionStrength = 0.005 28 | shader_parameter/dissolveNoiseTexture = SubResource("2") 29 | shader_parameter/distortionNoiseTexture = SubResource("4") 30 | -------------------------------------------------------------------------------- /WaterShader/WaterScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=19 format=3 uid="uid://dw1750wsllp02"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dtqbrhmx6rgo1" path="res://Assets/Sunnyland/artwork/Environment/back.png" id="1"] 4 | [ext_resource type="PackedScene" uid="uid://bwo86o365235w" path="res://ground.tscn" id="1_swqm4"] 5 | [ext_resource type="Texture2D" uid="uid://boujvlbmki6bf" path="res://Assets/Sunnyland/artwork/Environment/props/tree.png" id="2"] 6 | [ext_resource type="Material" uid="uid://dob7hvc1kwo63" path="res://WaterShader/water_mat.tres" id="3"] 7 | [ext_resource type="Script" path="res://WaterShader/camera_script.gd" id="4"] 8 | [ext_resource type="Script" path="res://WaterShader/water_script.gd" id="5"] 9 | [ext_resource type="Texture2D" uid="uid://6g4ty2fvfe" path="res://WaterShader/noise.png" id="6"] 10 | [ext_resource type="Texture2D" uid="uid://c4an8pnge3q21" path="res://Assets/Sunnyland/artwork/Environment/props/rock.png" id="7"] 11 | [ext_resource type="Texture2D" uid="uid://6kcyoip7w4qu" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-1.png" id="8"] 12 | [ext_resource type="Texture2D" uid="uid://ci2fa5t2me6h" path="res://Assets/Sunnyland/artwork/Environment/props/shrooms.png" id="10"] 13 | [ext_resource type="Texture2D" uid="uid://crhg85pob7c0f" path="res://Assets/Sunnyland/artwork/Environment/props/house.png" id="11"] 14 | [ext_resource type="Texture2D" uid="uid://s3rb6yuxqyhb" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-2.png" id="12"] 15 | [ext_resource type="Texture2D" uid="uid://dumqipkpdbe8k" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-3.png" id="13"] 16 | [ext_resource type="Texture2D" uid="uid://bjf07piu25laq" path="res://Assets/Sunnyland/artwork/Sprites/player/idle/player-idle-4.png" id="14"] 17 | [ext_resource type="Texture2D" uid="uid://cyporcuua045k" path="res://Assets/Sunnyland/artwork/Environment/props/bush.png" id="15"] 18 | [ext_resource type="Texture2D" uid="uid://ckjebykt1e8jx" path="res://Assets/Sunnyland/artwork/Environment/middle.png" id="16"] 19 | [ext_resource type="Texture2D" uid="uid://byi2rxheft22k" path="res://Assets/Sunnyland/artwork/Environment/props/big-crate.png" id="17"] 20 | 21 | [sub_resource type="SpriteFrames" id="1"] 22 | animations = [{ 23 | "frames": [{ 24 | "duration": 1.0, 25 | "texture": ExtResource("8") 26 | }, { 27 | "duration": 1.0, 28 | "texture": ExtResource("12") 29 | }, { 30 | "duration": 1.0, 31 | "texture": ExtResource("13") 32 | }, { 33 | "duration": 1.0, 34 | "texture": ExtResource("14") 35 | }], 36 | "loop": true, 37 | "name": &"default", 38 | "speed": 5.0 39 | }] 40 | 41 | [node name="Node2D" type="Node2D"] 42 | 43 | [node name="ground" parent="." instance=ExtResource("1_swqm4")] 44 | 45 | [node name="bg" type="Sprite2D" parent="."] 46 | z_index = -5 47 | position = Vector2(15, -167.395) 48 | scale = Vector2(5, 5) 49 | texture = ExtResource("1") 50 | 51 | [node name="props" type="Node2D" parent="."] 52 | 53 | [node name="tree" type="Sprite2D" parent="props"] 54 | z_index = -1 55 | position = Vector2(-93.8489, -138.933) 56 | texture = ExtResource("2") 57 | 58 | [node name="rock" type="Sprite2D" parent="props"] 59 | position = Vector2(-47.407, -38.672) 60 | texture = ExtResource("7") 61 | 62 | [node name="rock2" type="Sprite2D" parent="props"] 63 | position = Vector2(-108.961, -37.7967) 64 | texture = ExtResource("7") 65 | 66 | [node name="shrooms" type="Sprite2D" parent="props"] 67 | position = Vector2(-114.61, -102.389) 68 | texture = ExtResource("10") 69 | 70 | [node name="shrooms2" type="Sprite2D" parent="props"] 71 | z_index = -2 72 | position = Vector2(-153.721, -102.39) 73 | texture = ExtResource("10") 74 | 75 | [node name="big-crate" type="Sprite2D" parent="props"] 76 | z_index = -1 77 | position = Vector2(-110.983, -270.636) 78 | texture = ExtResource("17") 79 | 80 | [node name="bush" type="Sprite2D" parent="props"] 81 | z_index = -1 82 | position = Vector2(-43.0405, -266.451) 83 | texture = ExtResource("15") 84 | 85 | [node name="house" type="Sprite2D" parent="props"] 86 | texture_repeat = 2 87 | position = Vector2(58.7934, -83.542) 88 | texture = ExtResource("11") 89 | 90 | [node name="middle" type="Sprite2D" parent="props"] 91 | z_index = -2 92 | position = Vector2(-3.50484, -7.55041) 93 | texture = ExtResource("16") 94 | 95 | [node name="middle2" type="Sprite2D" parent="props/middle"] 96 | z_index = -2 97 | position = Vector2(176, 1.268) 98 | texture = ExtResource("16") 99 | 100 | [node name="middle3" type="Sprite2D" parent="props/middle"] 101 | z_index = -2 102 | position = Vector2(352, 1.268) 103 | texture = ExtResource("16") 104 | 105 | [node name="middle4" type="Sprite2D" parent="props/middle"] 106 | z_index = -2 107 | position = Vector2(-176, 1.268) 108 | texture = ExtResource("16") 109 | 110 | [node name="middle5" type="Sprite2D" parent="props/middle"] 111 | z_index = -2 112 | position = Vector2(-352, 1.268) 113 | texture = ExtResource("16") 114 | 115 | [node name="Player" type="AnimatedSprite2D" parent="."] 116 | z_index = 1 117 | texture_repeat = 2 118 | position = Vector2(-33, -63.7) 119 | sprite_frames = SubResource("1") 120 | frame = 3 121 | offset = Vector2(0, 16) 122 | 123 | [node name="Camera2D" type="Camera2D" parent="."] 124 | position = Vector2(0, -60) 125 | zoom = Vector2(3, 3) 126 | limit_smoothed = true 127 | position_smoothing_speed = 10.0 128 | script = ExtResource("4") 129 | zoomIncrement = 0.1 130 | speed = 5.0 131 | target = NodePath("../CamTarget") 132 | 133 | [node name="CamTarget" type="Node2D" parent="."] 134 | position = Vector2(0, -60) 135 | 136 | [node name="Water" type="Sprite2D" parent="."] 137 | z_index = 5 138 | texture_repeat = 2 139 | material = ExtResource("3") 140 | scale = Vector2(2.6, 0.169922) 141 | texture = ExtResource("6") 142 | offset = Vector2(0, 256) 143 | region_enabled = true 144 | region_rect = Rect2(0, 0, 512, 512) 145 | script = ExtResource("5") 146 | cameraPath = NodePath("../Camera2D") 147 | -------------------------------------------------------------------------------- /WaterShader/camera_script.gd: -------------------------------------------------------------------------------- 1 | extends Camera2D 2 | 3 | @export var zoomIncrement: float = 0.05; 4 | @export var positionIncrement: float = 0.1; 5 | @export var speed: float = 1; 6 | @export var canBeMoved: bool = true; 7 | @export var canZoom: bool = true; 8 | 9 | @export var target: NodePath; 10 | 11 | var camZoom = Vector2(1,1); 12 | var targetPos = Vector2.ZERO; 13 | 14 | func _ready(): 15 | if(canZoom): camZoom = self.zoom; 16 | pass 17 | 18 | func _process(delta): 19 | if(canZoom): self.zoom = camZoom; 20 | if(canBeMoved): 21 | self.global_position = lerp(get_global_position(), get_node(target).position, delta*speed); 22 | 23 | if Input.is_key_pressed(KEY_W): 24 | get_node(target).position.y -= positionIncrement; 25 | elif Input.is_key_pressed(KEY_S): 26 | get_node(target).position.y += positionIncrement; 27 | if Input.is_key_pressed(KEY_A): 28 | get_node(target).position.x -= positionIncrement; 29 | elif Input.is_key_pressed(KEY_D): 30 | get_node(target).position.x += positionIncrement; 31 | pass 32 | 33 | func _input(event): 34 | if(canZoom && Input.is_mouse_button_pressed(4)): #wheel up 35 | camZoom -= Vector2.ONE * zoomIncrement; 36 | if(canZoom && Input.is_mouse_button_pressed(5)): #wheel down 37 | camZoom += Vector2.ONE * zoomIncrement; 38 | #if event is InputEventKey and event.is_action_pressed(KEY_W): 39 | 40 | -------------------------------------------------------------------------------- /WaterShader/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/WaterShader/noise.png -------------------------------------------------------------------------------- /WaterShader/noise.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://6g4ty2fvfe" 6 | path="res://.godot/imported/noise.png-6a179da6eca9f47569d90a9fb676393e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://WaterShader/noise.png" 14 | dest_files=["res://.godot/imported/noise.png-6a179da6eca9f47569d90a9fb676393e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /WaterShader/water_mat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://dob7hvc1kwo63"] 2 | 3 | [ext_resource type="Shader" path="res://WaterShader/water_shader.gdshader" id="1"] 4 | 5 | [sub_resource type="FastNoiseLite" id="1"] 6 | 7 | [sub_resource type="NoiseTexture2D" id="2"] 8 | seamless = true 9 | noise = SubResource("1") 10 | 11 | [resource] 12 | shader = ExtResource("1") 13 | shader_parameter/tintStrength = 0.569 14 | shader_parameter/waterColor = Color(0, 0, 1, 1) 15 | shader_parameter/reflectionOffset = 0.0 16 | shader_parameter/reflectionBlur = 0.0 17 | shader_parameter/calculatedOffset = 0.0 18 | shader_parameter/calculatedAspect = 1.0 19 | shader_parameter/distortionScale = Vector2(1, 1) 20 | shader_parameter/distortionSpeed = Vector2(0.05, 0.02) 21 | shader_parameter/distortionStrength = 0.03 22 | shader_parameter/waveSmoothing = 0.01 23 | shader_parameter/mainWaveSpeed = 2.5 24 | shader_parameter/mainWaveFrequency = 20.0 25 | shader_parameter/mainWaveAmplitude = 0.005 26 | shader_parameter/secondWaveSpeed = 2.5 27 | shader_parameter/secondWaveFrequency = 20.0 28 | shader_parameter/secondWaveAmplitude = 0.01 29 | shader_parameter/thirdWaveSpeed = 2.5 30 | shader_parameter/thirdWaveFrequency = 20.0 31 | shader_parameter/thirdWaveAmplitude = 0.01 32 | shader_parameter/squashing = 1.0 33 | shader_parameter/shorelineColor = Color(0.0941176, 0.678431, 0.976471, 1) 34 | shader_parameter/shorelineSize = 0.012 35 | shader_parameter/foamSize = 0.057 36 | shader_parameter/foamStrength = 0.199 37 | shader_parameter/foamSpeed = 0.1 38 | shader_parameter/foamScale = Vector2(20, 10) 39 | shader_parameter/noiseTexture = SubResource("2") 40 | -------------------------------------------------------------------------------- /WaterShader/water_mat2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ShaderMaterial" load_steps=4 format=2] 2 | 3 | [ext_resource path="res://WaterShader/water_shader.shader" type="Shader" id=1] 4 | 5 | [sub_resource type="OpenSimplexNoise" id=1] 6 | 7 | [sub_resource type="NoiseTexture" id=2] 8 | seamless = true 9 | noise = SubResource( 1 ) 10 | 11 | [resource] 12 | render_priority = 1 13 | shader = ExtResource( 1 ) 14 | shader_param/offset = -0.1 15 | shader_param/aspect = 1.0 16 | shader_param/offsetStrength = 0.0 17 | shader_param/maxOffset = 10.0 18 | shader_param/distortionScale = Vector2( 0, 0 ) 19 | shader_param/distortionSpeed = Vector2( 0.1, 0.1 ) 20 | shader_param/waveSmoothing = 0.0 21 | shader_param/mainWaveSpeed = 0.0 22 | shader_param/mainWaveFrequency = 0.0 23 | shader_param/mainWaveAmplitude = 0.0 24 | shader_param/secondWaveSpeed = 0.0 25 | shader_param/secondWaveFrequency = 20.0 26 | shader_param/secondWaveAmplitude = 0.0 27 | shader_param/thirdWaveSpeed = 0.0 28 | shader_param/thirdWaveFrequency = 20.0 29 | shader_param/thirdWaveAmplitude = 0.0 30 | shader_param/squashing = 3.0 31 | shader_param/noiseTexture = SubResource( 2 ) 32 | -------------------------------------------------------------------------------- /WaterShader/water_script.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | @export var cameraPath: NodePath 4 | 5 | var scrHeight; 6 | var calculatedOffset : float; 7 | 8 | # Called when the node enters the scene tree for the first time. 9 | func _ready(): 10 | scrHeight = ProjectSettings.get_setting("display/window/size/viewport_height"); 11 | 12 | # Called every frame. 'delta' is the elapsed time since the previous frame. 13 | func _process(delta): 14 | var camZoom = get_node(cameraPath).zoom.y; 15 | 16 | var squashing = self.material.get_shader_parameter("squashing"); 17 | 18 | var adjustingForCameraPos = (get_node(cameraPath).position.y/(scrHeight))*(1+squashing); 19 | var adjustingForObjectPos = (self.position.y/(scrHeight))*(1+squashing); 20 | 21 | calculatedOffset = -0.5 + 0.5*squashing +(adjustingForCameraPos - adjustingForObjectPos) * camZoom; 22 | 23 | self.material.set_shader_parameter("calculatedOffset", calculatedOffset); 24 | self.material.set_shader_parameter("calculatedAspect", self.scale.y/self.scale.x); 25 | 26 | -------------------------------------------------------------------------------- /WaterShader/water_shader.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float tintStrength : hint_range(0., 1.); 4 | uniform vec4 waterColor : source_color = vec4(1.); 5 | uniform float reflectionOffset = 0; // allows player to control reflection position 6 | uniform float reflectionBlur = 0; // works only if projec's driver is set to GLES3, more information here https://docs.godotengine.org/ru/stable/tutorials/shading/screen-reading_shaders.html 7 | uniform float calculatedOffset = 0; // this is controlled by script, it takes into account camera position and water object position, that way reflection stays in the same place when camera is moving 8 | uniform float calculatedAspect = 1; // is controlled by script, ensures that noise is not affected by object scale 9 | uniform sampler2D noiseTexture : repeat_enable; 10 | 11 | uniform vec2 distortionScale = vec2(0.3, 0.3); 12 | uniform vec2 distortionSpeed = vec2(0.01, 0.02); 13 | uniform float distortionStrength = 0.01; 14 | //uniform float distortionContrast = 0.1; // uncomment if you want more contrast for the water distortion 15 | 16 | uniform float waveSmoothing = .01; 17 | 18 | uniform float mainWaveSpeed = 2.5; 19 | uniform float mainWaveFrequency = 20; 20 | uniform float mainWaveAmplitude = 0.005; 21 | 22 | uniform float secondWaveSpeed = 2.5; 23 | uniform float secondWaveFrequency = 20; 24 | uniform float secondWaveAmplitude = 0.015; 25 | 26 | uniform float thirdWaveSpeed = 2.5; 27 | uniform float thirdWaveFrequency = 20; 28 | uniform float thirdWaveAmplitude = 0.01; 29 | 30 | uniform float squashing = 1.; 31 | 32 | uniform vec4 shorelineColor : source_color = vec4(1.); 33 | uniform float shorelineSize : hint_range(0., 0.1) = 0.0025; 34 | uniform float foamSize : hint_range(0., 0.1) = 0.0025; 35 | uniform float foamStrength : hint_range(0., 2.) = 0.0025; 36 | uniform float foamSpeed; 37 | uniform vec2 foamScale; 38 | 39 | uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; 40 | void fragment() 41 | { 42 | vec2 uv = SCREEN_UV; 43 | uv.y = 1. - uv.y; // turning screen uvs upside down 44 | uv.y *= squashing; 45 | uv.y -= calculatedOffset; 46 | uv.y += reflectionOffset; 47 | 48 | vec2 noiseTextureUV = UV * distortionScale; 49 | noiseTextureUV.y *= calculatedAspect; 50 | noiseTextureUV += TIME * distortionSpeed; 51 | vec2 waterDistortion = texture(noiseTexture, noiseTextureUV).rg; 52 | 53 | //waterDistortion = smoothstep(vec2(0.), waterDistortion.rg, vec2(1.-distortionContrast)); // uncomment if you want more contrast for the water distortion 54 | waterDistortion *= distortionStrength; 55 | uv += waterDistortion.rg; 56 | 57 | vec4 color = textureLod(SCREEN_TEXTURE, uv, reflectionBlur); 58 | color.rgb = mix(color.rgb, waterColor.rgb, tintStrength); 59 | 60 | //adding the wave amplitude at the end to offset it enough so it doesn't go outside the sprite's bounds 61 | float distFromTop = mainWaveAmplitude * sin(UV.x * mainWaveFrequency + TIME * mainWaveSpeed) + mainWaveAmplitude 62 | + secondWaveAmplitude * sin(UV.x * secondWaveFrequency + TIME * secondWaveSpeed) + secondWaveAmplitude 63 | + thirdWaveAmplitude * cos(UV.x * thirdWaveFrequency - TIME * thirdWaveSpeed) + thirdWaveAmplitude; 64 | 65 | float waveArea = UV.y - distFromTop; 66 | waveArea = smoothstep(0., 1. * waveSmoothing, waveArea); 67 | color.a *= waveArea; 68 | 69 | float shorelineBottom = UV.y - distFromTop - shorelineSize; 70 | shorelineBottom = smoothstep(0., 1. * waveSmoothing, shorelineBottom); 71 | 72 | float shoreline = waveArea - shorelineBottom; 73 | color.rgb += shoreline * shorelineColor.rgb; 74 | 75 | vec4 foamNoise = texture(noiseTexture, UV * foamScale + TIME * foamSpeed); 76 | foamNoise.r = smoothstep(0.0, foamNoise.r, foamStrength); 77 | 78 | float shorelineFoam = UV.y - distFromTop; 79 | shorelineFoam = smoothstep(0.0, shorelineFoam, foamSize); 80 | shorelineFoam *= foamNoise.r; 81 | color.rgb += shorelineFoam * shorelineColor.rgb; 82 | 83 | COLOR = color; 84 | //COLOR = vec4(waterDistortion, 1., 1.); // uncomment to preview distortion 85 | } -------------------------------------------------------------------------------- /WaterShader/water_shader.shader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | 4 | uniform float reflectionOffset = 0; // allows player to control reflection position 5 | uniform float reflectionBlur = 0; // works only if projec's driver is set to GLES3, more information here https://docs.godotengine.org/ru/stable/tutorials/shading/screen-reading_shaders.html 6 | uniform float calculatedOffset = 0; // this is controlled by script, it takes into account camera position and water object position, that way reflection stays in the same place when camera is moving 7 | uniform float calculatedAspect = 1; // is controlled by script, ensures that noise is not affected by object scale 8 | uniform sampler2D noiseTexture; 9 | uniform float offsetStrength; 10 | uniform float maxOffset; 11 | 12 | uniform vec2 distortionScale = vec2(0.3, 0.3); 13 | uniform vec2 distortionSpeed = vec2(0.01, 0.02); 14 | uniform vec2 distortionStrength = vec2(0.01, 0.02); 15 | 16 | uniform float waveSmoothing = .01; 17 | 18 | uniform float mainWaveSpeed = 2.5; 19 | uniform float mainWaveFrequency = 20; 20 | uniform float mainWaveAmplitude = 0.005; 21 | 22 | uniform float secondWaveSpeed = 2.5; 23 | uniform float secondWaveFrequency = 20; 24 | uniform float secondWaveAmplitude = 0.015; 25 | 26 | uniform float thirdWaveSpeed = 2.5; 27 | uniform float thirdWaveFrequency = 20; 28 | uniform float thirdWaveAmplitude = 0.01; 29 | 30 | uniform float squashing = 1.; 31 | 32 | uniform vec4 shorelineColor : hint_color = vec4(1.); 33 | uniform float shorelineSize : hint_range(0., 0.1) = 0.0025; 34 | uniform float foamSize : hint_range(0., 0.1) = 0.0025; 35 | uniform float foamStrength : hint_range(0., 2.) = 0.0025; 36 | uniform float foamSpeed; 37 | uniform vec2 foamScale; 38 | 39 | void fragment() 40 | { 41 | 42 | vec2 uv = SCREEN_UV; 43 | uv.y = 1. - uv.y; // turning screen uvs upside down 44 | uv.y *= squashing; 45 | uv.y -= calculatedOffset; 46 | uv.y += reflectionOffset; 47 | 48 | vec2 noiseTextureUV = UV * distortionScale; 49 | noiseTextureUV.y *= calculatedAspect; 50 | noiseTextureUV += TIME * distortionSpeed; // scroll noise over time 51 | 52 | vec2 waterDistortion = texture(noiseTexture, noiseTextureUV).rg; 53 | waterDistortion.rg *= distortionStrength.xy; 54 | waterDistortion.xy = smoothstep(0.0, 5., waterDistortion.xy); 55 | uv += waterDistortion; 56 | 57 | vec4 color = textureLod(SCREEN_TEXTURE, uv, reflectionBlur); 58 | 59 | //adding the wave amplitude at the end to offset it enough so it doesn't go outside the sprite's bounds 60 | float distFromTop = mainWaveAmplitude * sin(UV.x * mainWaveFrequency + TIME * mainWaveSpeed) + mainWaveAmplitude 61 | + secondWaveAmplitude * sin(UV.x * secondWaveFrequency + TIME * secondWaveSpeed) + secondWaveAmplitude 62 | + thirdWaveAmplitude * cos(UV.x * thirdWaveFrequency - TIME * thirdWaveSpeed) + thirdWaveAmplitude; 63 | 64 | float waveArea = UV.y - distFromTop; 65 | 66 | 67 | waveArea = smoothstep(0., 1. * waveSmoothing, waveArea); 68 | 69 | color.a *= waveArea; 70 | 71 | float shorelineBottom = UV.y - distFromTop - shorelineSize; 72 | shorelineBottom = smoothstep(0., 1. * waveSmoothing, shorelineBottom); 73 | 74 | float shoreline = waveArea - shorelineBottom; 75 | color.rgb += shoreline * shorelineColor.rgb; 76 | 77 | //this approach allows smoother blendign between shoreline and foam 78 | /* 79 | float shorelineTest1 = UV.y - distFromTop; 80 | shorelineTest1 = smoothstep(0.0, shorelineTest1, shorelineSize); 81 | color.rgb += shorelineTest1 * shorelineColor.rgb; 82 | */ 83 | 84 | vec4 foamNoise = texture(noiseTexture, UV* foamScale + TIME * foamSpeed); 85 | foamNoise.r = smoothstep(0.0, foamNoise.r, foamStrength); 86 | 87 | float shorelineFoam = UV.y - distFromTop; 88 | shorelineFoam = smoothstep(0.0, shorelineFoam, foamSize); 89 | 90 | shorelineFoam *= foamNoise.r; 91 | color.rgb += shorelineFoam * shorelineColor.rgb; 92 | 93 | COLOR = color; 94 | } -------------------------------------------------------------------------------- /default_env.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Environment" load_steps=2 format=3 uid="uid://c0kfc083x20ny"] 2 | 3 | [sub_resource type="Sky" id="1"] 4 | 5 | [resource] 6 | background_mode = 2 7 | sky = SubResource("1") 8 | -------------------------------------------------------------------------------- /ground.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bwo86o365235w"] 2 | 3 | [ext_resource type="TileSet" uid="uid://cwbux4mbdb1vm" path="res://ground_tileset.tres" id="1_vtcwv"] 4 | 5 | [node name="ground" type="Node2D"] 6 | 7 | [node name="Ground" type="TileMap" parent="."] 8 | z_index = 1 9 | tile_set = ExtResource("1_vtcwv") 10 | format = 2 11 | layer_0/tile_data = PackedInt32Array(-65551, 131072, 1, -15, 131072, 2, 65521, 131072, 3, -65550, 196608, 1, -14, 196608, 2, 65522, 196608, 3, -65549, 65536, 1, -13, 65536, 2, 65523, 65536, 3, -65548, 131072, 1, -12, 131072, 2, 65524, 131072, 3, -65547, 196608, 1, -11, 196608, 2, 65525, 196608, 3, -65546, 65536, 1, -10, 65536, 2, 65526, 65536, 3, -65545, 131072, 1, -9, 131072, 2, 65527, 131072, 3, -65544, 196608, 1, -8, 196608, 2, 65528, 196608, 3, -65543, 65536, 1, -7, 65536, 2, 65529, 65536, 3, -65542, 131072, 1, -6, 131072, 2, 65530, 131072, 3, -65541, 196608, 1, -5, 196608, 2, 65531, 196608, 3, -65540, 65536, 1, -4, 65536, 2, 65532, 65536, 3, -65539, 131072, 1, -3, 131072, 2, 65533, 131072, 3, -65538, 196608, 1, -2, 196608, 2, 65534, 196608, 3, -65537, 65536, 1, -1, 65536, 2, 65535, 65536, 3, -131072, 131072, 1, -65536, 131072, 2, 0, 131072, 3, -131071, 196608, 1, -65535, 196608, 2, 1, 196608, 3, -131070, 65536, 1, -65534, 65536, 2, 2, 65536, 3, -131069, 131072, 1, -65533, 131072, 2, 3, 131072, 3, -131068, 196608, 1, -65532, 196608, 2, 4, 196608, 3, -131067, 65536, 1, -65531, 65536, 2, 5, 65536, 3, -131066, 131072, 1, -65530, 131072, 2, 6, 131072, 3, -131065, 196608, 1, -65529, 196608, 2, 7, 196608, 3, -131064, 65536, 1, -65528, 65536, 2, 8, 65536, 3, -131063, 131072, 1, -65527, 131072, 2, 9, 131072, 3, -131062, 196608, 1, -65526, 196608, 2, 10, 196608, 3, -131061, 65536, 1, -65525, 65536, 2, 11, 65536, 3, -131060, 131072, 1, -65524, 131072, 2, 12, 131072, 3, -131059, 196608, 1, -65523, 196608, 2, 13, 196608, 3, -131058, 65536, 1, -65522, 65536, 2, 14, 65536, 3, -131057, 131072, 1, -65521, 131072, 2, 15, 131072, 3, -131056, 196608, 1, -65520, 196608, 2, 16, 196608, 3, -131055, 65536, 1, -65519, 65536, 2, 17, 65536, 3, -131054, 131072, 1, -65518, 131072, 2, 18, 131072, 3, -131053, 196608, 1, -65517, 196608, 2, 19, 196608, 3, -131052, 65536, 1, -65516, 65536, 2, 20, 65536, 3, -65558, 65536, 1, -22, 65536, 2, 65514, 65536, 3, -65557, 131072, 1, -21, 131072, 2, 65515, 131072, 3, -65556, 196608, 1, -20, 196608, 2, 65516, 196608, 3, -65555, 65536, 1, -19, 65536, 2, 65517, 65536, 3, -65554, 131072, 1, -18, 131072, 2, 65518, 131072, 3, -65553, 196608, 1, -17, 196608, 2, 65519, 196608, 3, -65552, 65536, 1, -16, 65536, 2, 65520, 65536, 3, -131051, 131072, 1, -65515, 131072, 2, 21, 131072, 3, -131050, 196608, 1, -65514, 196608, 2, 22, 196608, 3, -131049, 65536, 1, -65513, 65536, 2, 23, 65536, 3, -131048, 131072, 1, -65512, 131072, 2, 24, 131072, 3, -131047, 196608, 1, -65511, 196608, 2, 25, 196608, 3, -131046, 65536, 1, -65510, 65536, 2, 26, 65536, 3, -131045, 131072, 1, -65509, 131072, 2, 27, 131072, 3, -131044, 196608, 1, -65508, 196608, 2, 28, 196608, 3, 131050, 65536, 2, 196586, 65536, 3, 131051, 131072, 2, 196587, 131072, 3, 131052, 196608, 2, 196588, 196608, 3, 131053, 65536, 2, 196589, 65536, 3, 131054, 131072, 2, 196590, 131072, 3, 131055, 196608, 2, 196591, 196608, 3, 131056, 65536, 2, 196592, 65536, 3, 131057, 131072, 2, 196593, 131072, 3, 131058, 196608, 2, 196594, 196608, 3, 131059, 65536, 2, 196595, 65536, 3, 131060, 131072, 2, 196596, 131072, 3, 131061, 196608, 2, 196597, 196608, 3, 131062, 65536, 2, 196598, 65536, 3, 131063, 131072, 2, 196599, 131072, 3, 131064, 196608, 2, 196600, 196608, 3, 131065, 65536, 2, 196601, 65536, 3, 131066, 131072, 2, 196602, 131072, 3, 131067, 196608, 2, 196603, 196608, 3, 131068, 65536, 2, 196604, 65536, 3, 131069, 131072, 2, 196605, 131072, 3, 131070, 196608, 2, 196606, 196608, 3, 131071, 65536, 2, 196607, 65536, 3, 65536, 131072, 2, 131072, 131072, 3, 65537, 196608, 2, 131073, 196608, 3, 65538, 65536, 2, 131074, 65536, 3, 65539, 131072, 2, 131075, 131072, 3, 65540, 196608, 2, 131076, 196608, 3, 65541, 65536, 2, 131077, 65536, 3, 65542, 131072, 2, 131078, 131072, 3, 65543, 196608, 2, 131079, 196608, 3, 65544, 65536, 2, 131080, 65536, 3, 65545, 131072, 2, 131081, 131072, 3, 65546, 196608, 2, 131082, 196608, 3, 65547, 65536, 2, 131083, 65536, 3, 65548, 131072, 2, 131084, 131072, 3, 65549, 196608, 2, 131085, 196608, 3, 65550, 65536, 2, 131086, 65536, 3, 65551, 131072, 2, 131087, 131072, 3, 65552, 196608, 2, 131088, 196608, 3, 65553, 65536, 2, 131089, 65536, 3, 65554, 131072, 2, 131090, 131072, 3, 65555, 196608, 2, 131091, 196608, 3, 65556, 65536, 2, 131092, 65536, 3, 65557, 131072, 2, 131093, 131072, 3, 65558, 196608, 2, 131094, 196608, 3, 65559, 65536, 2, 131095, 65536, 3, 65560, 131072, 2, 131096, 131072, 3, 65561, 196608, 2, 131097, 196608, 3, 65562, 65536, 2, 131098, 65536, 3, 65563, 131072, 2, 131099, 131072, 3, 65564, 196608, 2, 131100, 196608, 3) 12 | 13 | [node name="Ground2" type="TileMap" parent="."] 14 | tile_set = ExtResource("1_vtcwv") 15 | format = 2 16 | layer_0/tile_data = PackedInt32Array(-65549, 65536, 3, -13, 65536, 3, -65548, 131072, 3, -12, 131072, 3, -65547, 196608, 3, -11, 196608, 3, -65546, 65536, 3, -10, 65536, 3, -65545, 131072, 3, -9, 131072, 3, -65544, 196608, 3, -8, 196608, 3, -65543, 65536, 3, -7, 65536, 3, -65542, 131072, 3, -6, 131072, 3, -65541, 196608, 3, -5, 196608, 3, -196612, 65536, 3, -196611, 131072, 3, -131075, 131072, 2, -131076, 65536, 2, -196614, 131072, 3, -131077, 196608, 2, -196613, 196608, 3, -196620, 131072, 3, -196619, 196608, 3, -196616, 196608, 3, -196617, 131072, 3, -196615, 65536, 3, -131079, 65536, 2, -131080, 196608, 2, -131081, 131072, 2, -131082, 65536, 2, -131083, 196608, 2, -131084, 131072, 2, -131078, 131072, 2, -196618, 65536, 3, -196624, 65536, 3, -196625, 196608, 3, -196626, 131072, 3, -65540, 65536, 3, -65539, 131072, 3, -196610, 196608, 3, -131074, 196608, 2, -65538, 196608, 3, -196621, 65536, 3, -131085, 65536, 2, -131088, 65536, 2, -65552, 65536, 3, -196623, 131072, 3, -131087, 131072, 2, -65551, 131072, 3, -196622, 196608, 3, -131086, 196608, 2, -65550, 196608, 3, -196627, 65536, 3, -131091, 65536, 2, -65555, 65536, 3, -131090, 131072, 2, -65554, 131072, 3, -131089, 196608, 2, -65553, 196608, 3, -327699, 65536, 1, -262163, 65536, 2, -327698, 131072, 1, -262162, 131072, 2, -327697, 196608, 1, -262161, 196608, 2, -327696, 65536, 1, -262160, 65536, 2, -327695, 131072, 1, -262159, 131072, 2, -327694, 196608, 1, -262158, 196608, 2, -327693, 65536, 1, -262157, 65536, 2, -327692, 131072, 1, -262156, 131072, 2, -327691, 196608, 1, -262155, 196608, 2, -327690, 65536, 1, -262154, 65536, 2, -327689, 131072, 1, -262153, 131072, 2, -327688, 196608, 1, -262152, 196608, 2, -327687, 65536, 1, -262151, 65536, 2, -327686, 131072, 1, -262150, 131072, 2, -327685, 196608, 1, -262149, 196608, 2, -327684, 65536, 1, -262148, 65536, 2, -327683, 131072, 1, -262147, 131072, 2, -327682, 196608, 1, -262146, 196608, 2) 17 | -------------------------------------------------------------------------------- /ground_tileset.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="TileSet" load_steps=3 format=3 uid="uid://cwbux4mbdb1vm"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://cur8xkl8gqlkc" path="res://Assets/Sunnyland/artwork/Environment/tileset.png" id="2"] 4 | 5 | [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_njnj2"] 6 | texture = ExtResource("2") 7 | 1:1/0 = 0 8 | 1:1/0/terrain_set = 0 9 | 1:1/0/terrain = 0 10 | 1:1/0/terrains_peering_bit/bottom_left_corner = 0 11 | 1:1/0/terrains_peering_bit/top_left_corner = 0 12 | 1:1/0/terrains_peering_bit/top_right_corner = 0 13 | 2:2/0 = 0 14 | 2:2/0/terrain_set = 0 15 | 3:2/0 = 0 16 | 3:2/0/terrain_set = 0 17 | 3:2/0/terrain = 0 18 | 3:2/0/terrains_peering_bit/bottom_right_corner = 0 19 | 3:2/0/terrains_peering_bit/top_right_corner = 0 20 | 3:3/0 = 0 21 | 3:3/0/terrain_set = 0 22 | 3:3/0/terrain = 0 23 | 3:3/0/terrains_peering_bit/bottom_right_corner = 0 24 | 3:3/0/terrains_peering_bit/bottom_left_corner = 0 25 | 3:3/0/terrains_peering_bit/top_right_corner = 0 26 | 2:3/0 = 0 27 | 2:3/0/terrain_set = 0 28 | 2:3/0/terrains_peering_bit/bottom_right_corner = 0 29 | 2:3/0/terrains_peering_bit/bottom_left_corner = 0 30 | 1:3/0 = 0 31 | 1:3/0/terrain_set = 0 32 | 1:3/0/terrains_peering_bit/bottom_right_corner = 0 33 | 1:3/0/terrains_peering_bit/bottom_left_corner = 0 34 | 1:3/0/terrains_peering_bit/top_left_corner = 0 35 | 1:2/0 = 0 36 | 1:2/0/terrain_set = 0 37 | 1:2/0/terrains_peering_bit/bottom_left_corner = 0 38 | 1:2/0/terrains_peering_bit/top_left_corner = 0 39 | 2:1/0 = 0 40 | 2:1/0/terrain_set = 0 41 | 2:1/0/terrain = 0 42 | 2:1/0/terrains_peering_bit/top_left_corner = 0 43 | 2:1/0/terrains_peering_bit/top_right_corner = 0 44 | 3:1/0 = 0 45 | 3:1/0/terrain_set = 0 46 | 3:1/0/terrains_peering_bit/bottom_right_corner = 0 47 | 3:1/0/terrains_peering_bit/top_left_corner = 0 48 | 3:1/0/terrains_peering_bit/top_right_corner = 0 49 | 50 | [resource] 51 | terrain_set_0/mode = 1 52 | terrain_set_0/terrain_0/name = "Terrain 0" 53 | terrain_set_0/terrain_0/color = Color(0.501961, 0.345098, 0.25098, 1) 54 | sources/0 = SubResource("TileSetAtlasSource_njnj2") 55 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/icon.png -------------------------------------------------------------------------------- /icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bbyeycpyjl214" 6 | path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://icon.png" 14 | dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /pixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedevserj/Godot-Shaders/2ff00d21b0d8cd7d6cabb1a2be98d827565f1f6c/pixel.png -------------------------------------------------------------------------------- /pixel.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://3mjuf8jwwfly" 6 | path="res://.godot/imported/pixel.png-5fd5f2727b2210c36f485c903cd0a0d4.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://pixel.png" 14 | dest_files=["res://.godot/imported/pixel.png-5fd5f2727b2210c36f485c903cd0a0d4.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=5 10 | 11 | [application] 12 | 13 | config/name="Godot-Shaders" 14 | run/main_scene="res://WaterShader/WaterScene.tscn" 15 | config/features=PackedStringArray("4.2") 16 | run/max_fps=60 17 | config/icon="res://icon.png" 18 | 19 | [display] 20 | 21 | window/size/resizable=false 22 | 23 | [dotnet] 24 | 25 | project/assembly_name="Godot-Shaders" 26 | 27 | [input] 28 | 29 | mouse_wheel_up={ 30 | "deadzone": 0.5, 31 | "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":4,"canceled":false,"pressed":false,"double_click":false,"script":null) 32 | ] 33 | } 34 | mouse_wheel_down={ 35 | "deadzone": 0.5, 36 | "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":5,"canceled":false,"pressed":false,"double_click":false,"script":null) 37 | ] 38 | } 39 | test={ 40 | "deadzone": 0.5, 41 | "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":32,"key_label":0,"unicode":32,"echo":false,"script":null) 42 | ] 43 | } 44 | 45 | [rendering] 46 | 47 | environment/defaults/default_environment="res://default_env.tres" 48 | quality/2d/use_pixel_snap=true 49 | --------------------------------------------------------------------------------