This commit is contained in:
Crizomb 2025-05-15 14:28:08 +02:00
commit b97b3a9ae4
79 changed files with 1729 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cyehiyi0vm78q"
path="res://.godot/imported/_01_ground.png-51ca074c8ff7b0c88d0409a096dd5812.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_01_ground.png"
dest_files=["res://.godot/imported/_01_ground.png-51ca074c8ff7b0c88d0409a096dd5812.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1kw7agartg3r"
path="res://.godot/imported/_02_trees and bushes.png-231d9431694cd2e2ac97c3bed7c1dda1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_02_trees and bushes.png"
dest_files=["res://.godot/imported/_02_trees and bushes.png-231d9431694cd2e2ac97c3bed7c1dda1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://shl14tvqugds"
path="res://.godot/imported/_03_distant_trees.png-e0a790a7292da24d040b6952d57004f7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_03_distant_trees.png"
dest_files=["res://.godot/imported/_03_distant_trees.png-e0a790a7292da24d040b6952d57004f7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dhynvws72e4uf"
path="res://.godot/imported/_04_bushes.png-c3412ceb007dfafc9a8f3f2b89a95eee.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_04_bushes.png"
dest_files=["res://.godot/imported/_04_bushes.png-c3412ceb007dfafc9a8f3f2b89a95eee.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fdwjphvawvbf"
path="res://.godot/imported/_05_hill1.png-d4281d31d5f789f1e6896b5e48f51057.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_05_hill1.png"
dest_files=["res://.godot/imported/_05_hill1.png-d4281d31d5f789f1e6896b5e48f51057.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bo0pvl7nyi3wq"
path="res://.godot/imported/_06_hill2.png-90cbdcd735040b0d072257b3cbb296e9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_06_hill2.png"
dest_files=["res://.godot/imported/_06_hill2.png-90cbdcd735040b0d072257b3cbb296e9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgknjkq6ph582"
path="res://.godot/imported/_07_huge_clouds.png-7a122b5e9a510ed80f846df64b2ab80e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_07_huge_clouds.png"
dest_files=["res://.godot/imported/_07_huge_clouds.png-7a122b5e9a510ed80f846df64b2ab80e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3ahqc2mhbmso"
path="res://.godot/imported/_08_clouds.png-9d1e53c3c789f33b541f0f1978023e08.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_08_clouds.png"
dest_files=["res://.godot/imported/_08_clouds.png-9d1e53c3c789f33b541f0f1978023e08.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1rdrrvq8cyd6"
path="res://.godot/imported/_09_distant_clouds1.png-07da5b6089e84a998acb6afc814f0be9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_09_distant_clouds1.png"
dest_files=["res://.godot/imported/_09_distant_clouds1.png-07da5b6089e84a998acb6afc814f0be9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cek2ji2ndkis5"
path="res://.godot/imported/_10_distant_clouds.png-8dda05a69a7d79cb406860d4fd0d6fa3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_10_distant_clouds.png"
dest_files=["res://.godot/imported/_10_distant_clouds.png-8dda05a69a7d79cb406860d4fd0d6fa3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cdkpfj2ox2lw1"
path="res://.godot/imported/_11_background.png-d15e49f45cd964d23fbcc97cb49a1c8a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo2/assets/parallax backgound pack/_11_background.png"
dest_files=["res://.godot/imported/_11_background.png-d15e49f45cd964d23fbcc97cb49a1c8a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

253
exo2/exo2.tscn Normal file
View file

@ -0,0 +1,253 @@
[gd_scene load_steps=26 format=3 uid="uid://b6dp24ttkuo86"]
[ext_resource type="Texture2D" uid="uid://cyehiyi0vm78q" path="res://exo2/assets/parallax backgound pack/_01_ground.png" id="1_xfcy5"]
[ext_resource type="Texture2D" uid="uid://d1kw7agartg3r" path="res://exo2/assets/parallax backgound pack/_02_trees and bushes.png" id="2_opxly"]
[ext_resource type="Texture2D" uid="uid://shl14tvqugds" path="res://exo2/assets/parallax backgound pack/_03_distant_trees.png" id="3_m53lj"]
[ext_resource type="Texture2D" uid="uid://dhynvws72e4uf" path="res://exo2/assets/parallax backgound pack/_04_bushes.png" id="4_0c62v"]
[ext_resource type="Texture2D" uid="uid://fdwjphvawvbf" path="res://exo2/assets/parallax backgound pack/_05_hill1.png" id="5_0kksg"]
[ext_resource type="Texture2D" uid="uid://bo0pvl7nyi3wq" path="res://exo2/assets/parallax backgound pack/_06_hill2.png" id="6_dq1cv"]
[ext_resource type="Texture2D" uid="uid://bgknjkq6ph582" path="res://exo2/assets/parallax backgound pack/_07_huge_clouds.png" id="7_yqvhb"]
[ext_resource type="Texture2D" uid="uid://3ahqc2mhbmso" path="res://exo2/assets/parallax backgound pack/_08_clouds.png" id="8_etnl4"]
[ext_resource type="Texture2D" uid="uid://c1rdrrvq8cyd6" path="res://exo2/assets/parallax backgound pack/_09_distant_clouds1.png" id="9_jrtlg"]
[ext_resource type="Texture2D" uid="uid://cek2ji2ndkis5" path="res://exo2/assets/parallax backgound pack/_10_distant_clouds.png" id="10_ck8c7"]
[ext_resource type="Texture2D" uid="uid://cdkpfj2ox2lw1" path="res://exo2/assets/parallax backgound pack/_11_background.png" id="11_0y34s"]
[ext_resource type="Script" uid="uid://dgakeqjbc0eyv" path="res://pas_touche/inter_exo/lana_exo2.gd" id="13_wtyjt"]
[ext_resource type="Texture2D" uid="uid://4g6qnykfjdba" path="res://exo1/assets/logo-CELL.png" id="13_yllor"]
[ext_resource type="Shader" uid="uid://bxh7ct2ofg1xy" path="res://exo2/shaders/1_simple_noise_exemple.gdshader" id="14_yllor"]
[ext_resource type="Shader" uid="uid://pie6shk758tp" path="res://exo2/shaders/2_read_screen_tex.gdshader" id="15_jp0bh"]
[ext_resource type="Shader" uid="uid://djppqek35tujs" path="res://exo2/shaders/3_simple_vertex_shader.gdshader" id="16_0olsu"]
[sub_resource type="CircleShape2D" id="CircleShape2D_disjo"]
radius = 50.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_s3b2g"]
size = Vector2(12288, 1024)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_yllor"]
noise_type = 0
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_yllor"]
noise = SubResource("FastNoiseLite_yllor")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_jp0bh"]
shader = ExtResource("14_yllor")
shader_parameter/speed = 0.5
shader_parameter/noise_tex = SubResource("NoiseTexture2D_yllor")
[sub_resource type="QuadMesh" id="QuadMesh_wtyjt"]
size = Vector2(500, 500)
[sub_resource type="LabelSettings" id="LabelSettings_yllor"]
line_spacing = 0.0
font_size = 50
font_color = Color(0.187176, 0.187176, 0.187176, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0olsu"]
shader = ExtResource("15_jp0bh")
shader_parameter/new_green_color = Color(0.587817, 0.124166, 0.202083, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pld4h"]
shader = ExtResource("16_0olsu")
[node name="Exo2" type="Node2D"]
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
follow_viewport_enabled = true
[node name="ParallaxLayer1" type="ParallaxLayer" parent="ParallaxBackground"]
[node name="01Ground" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer1"]
texture_repeat = 3
position = Vector2(0, 795)
texture = ExtResource("1_xfcy5")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 3092)
[node name="ParallaxLayer2" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2(0.4, 0.4)
[node name="02TreesAndBushes" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer2"]
z_index = -1
texture_repeat = 3
texture = ExtResource("2_opxly")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
region_filter_clip_enabled = true
[node name="ParallaxLayer3" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2(0.3, 0.3)
[node name="03DistantTrees" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer3"]
z_index = -2
texture_repeat = 3
texture = ExtResource("3_m53lj")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer4" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2(0.2, 0.2)
[node name="04Bushes" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer4"]
z_index = -3
texture_repeat = 3
texture = ExtResource("4_0c62v")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer5" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2(0.1, 0.1)
[node name="05Hill1" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer5"]
z_index = -4
texture_repeat = 3
texture = ExtResource("5_0kksg")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer6" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2(0.06, 0.06)
[node name="06Hill2" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer6"]
z_index = -5
texture_repeat = 3
texture = ExtResource("6_dq1cv")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer7" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -7
motion_scale = Vector2(0.03, 0.03)
[node name="07HugeClouds" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer7"]
texture_repeat = 3
texture = ExtResource("7_yqvhb")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer8" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -8
motion_scale = Vector2(0.02, 0.02)
[node name="08Clouds" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer8"]
texture_repeat = 3
texture = ExtResource("8_etnl4")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer9" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -7
motion_scale = Vector2(0.01, 0.01)
[node name="09DistantClouds1" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer9"]
z_index = -9
texture_repeat = 3
texture = ExtResource("9_jrtlg")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer10" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -10
motion_scale = Vector2(0.01, 0.01)
[node name="10DistantClouds" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer10"]
texture_repeat = 3
texture = ExtResource("10_ck8c7")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="ParallaxLayer11" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -11
[node name="11Background" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer11"]
texture_repeat = 3
texture = ExtResource("11_0y34s")
region_enabled = true
region_rect = Rect2(0, 0, 12288, 1546)
[node name="LanaExo2" type="CharacterBody2D" parent="."]
position = Vector2(-1137, 417)
script = ExtResource("13_wtyjt")
[node name="Logo-cell" type="Sprite2D" parent="LanaExo2"]
rotation = 3.14159
scale = Vector2(0.05, 0.05)
texture = ExtResource("13_yllor")
[node name="CollisionShape2D" type="CollisionShape2D" parent="LanaExo2"]
position = Vector2(-2, -55)
shape = SubResource("CircleShape2D_disjo")
[node name="Camera2D" type="Camera2D" parent="LanaExo2"]
[node name="Ground" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
position = Vector2(28, 978)
shape = SubResource("RectangleShape2D_s3b2g")
[node name="Shaders" type="Node2D" parent="."]
[node name="1_SimpleNoiseTex" type="MeshInstance2D" parent="Shaders"]
material = SubResource("ShaderMaterial_jp0bh")
position = Vector2(-577, 289)
mesh = SubResource("QuadMesh_wtyjt")
[node name="Label2" type="Label" parent="Shaders/1_SimpleNoiseTex"]
offset_left = -333.0
offset_top = -703.0
offset_right = 1299.0
offset_bottom = -220.0
text = "1) Lecture de texture
Bon tu connais la chanson, va dans shaders et
clique sur le shader avec 1 devant
Lis bien les commentaires du code ! (y'a un TODO)"
label_settings = SubResource("LabelSettings_yllor")
[node name="2_ReadScreenTex" type="MeshInstance2D" parent="Shaders"]
material = SubResource("ShaderMaterial_0olsu")
position = Vector2(747, 189)
mesh = SubResource("QuadMesh_wtyjt")
[node name="Label3" type="Label" parent="Shaders/2_ReadScreenTex"]
offset_left = -233.0
offset_top = -635.0
offset_right = 1399.0
offset_bottom = -221.0
text = "2) Texture d'ecran
Bouge le noeud 2_ReadScreenTex
sur l'ecran. Qu'est-ce qui se passe ? Va dans le shaders,
et lis les commentaires
(y'a un TODO)"
label_settings = SubResource("LabelSettings_yllor")
[node name="3_SimpleVertexShader" type="MeshInstance2D" parent="Shaders"]
material = SubResource("ShaderMaterial_pld4h")
position = Vector2(2363, 189)
mesh = SubResource("QuadMesh_wtyjt")
[node name="Label3" type="Label" parent="Shaders/3_SimpleVertexShader"]
offset_left = -233.0
offset_top = -635.0
offset_right = 1399.0
offset_bottom = -221.0
text = "3) Simple vertex shader
Regarde le code
et lis les commentaires
(y'a un TODO)"
label_settings = SubResource("LabelSettings_yllor")
[node name="Labels" type="Node2D" parent="Shaders"]
[node name="Label" type="Label" parent="Shaders/Labels"]
offset_left = -2214.0
offset_top = -324.0
offset_right = -582.0
offset_bottom = -117.0
text = "Bienvenue dans l'exo 2 !
Finit les tableaux, on va voir des shaders plus
utiles et interessants !"
label_settings = SubResource("LabelSettings_yllor")

View file

@ -0,0 +1,18 @@
extends Camera2D
@export var lana : Lana
@export var lerp_speed := 10
var target_pos : Vector2
func _ready() -> void:
target_pos = lana.position
func _process(delta: float) -> void:
#var screen_center : Vector2 = get_screen_center_position()
var diff := lana.position.x - target_pos.x
var screen_size := get_viewport_rect().size.x
if abs(diff) > screen_size / 2:
target_pos.x += screen_size * sign(diff)
position.x = lerp(position.x, target_pos.x, lerp_speed*delta)

View file

@ -0,0 +1 @@
uid://0cv88akfi7rx

View file

@ -0,0 +1,22 @@
shader_type canvas_item;
// Uniform c'est comme les exports en gdscripts. Pour y avoir acces et les changer :
// Va dans l'inspecteur de Exo2/Shaders/1_SimpleNoiseTex (dans ta scene)
// Va dans la partie CanvasItem
// Clique sur Material (de canvasItem fais attention)
// Clique sur l'onglet Shader Parameters
uniform float speed;
uniform sampler2D noise_tex : repeat_enable;
void fragment() {
vec2 new_uv = UV + speed * TIME * vec2(1, 1);
COLOR.a = texture(noise_tex, new_uv).r;
// Color.a c'est l'alpha. alpha de 0 : l'objet est transparent. alpha de 1 l'objet est visible
// .r car la texture renvoie une couleur, et on veut juste un float
}
// Change un peu les parametres, voir ce que ca fait.
// TODO :
// Change la couleur, je veux du bleu pas du blanc.
// Dans Noise Tex, change le Noise Type.
// Je pense Cellular donne un bon truc

View file

@ -0,0 +1 @@
uid://bxh7ct2ofg1xy

View file

@ -0,0 +1,34 @@
shader_type canvas_item;
render_mode blend_disabled;
// On definit un uniform, donc quelque chose que le shader a en input
// ici hint_screen_texture signifie qu'on recupere la texture de l'ecran
// repeat_disable qu'on souhaite pas que la texture soit infinie et se repete
// filter_nearest qu'on veut pas d'interpolation bizzare
uniform sampler2D screen_tex : hint_screen_texture, repeat_disable, filter_nearest;
uniform vec3 new_green_color : source_color;
void fragment() {
// Called for every pixel the material is visible on.
vec3 screen_color = texture(screen_tex, SCREEN_UV).rgb;
// Le produit scalaire (dot) est tres utile pour avoir une sorte de distance entre deux vecteurs
// On veut savoir si le pixel derriere est vert,
// donc on compare ca au vecteur vert rgb normalize (vec3(0, 1, 0))
bool is_green = dot(normalize(screen_color), vec3(0, 1, 0)) > 0.69;
if (is_green){
// Moyenne ponderee, pour eviter d'avoir que du rouge (trop flat)
COLOR.rgb = (3.0*new_green_color + screen_color)/4.0;
}
else{
COLOR.rgb = screen_color;
}
// TODO
// Ajoute du bruit, je veux que les feuilles aient du bruit
// Ajoute une sorte de cadre, je veux bien voir les bordures de l'effet
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}

View file

@ -0,0 +1 @@
uid://pie6shk758tp

View file

@ -0,0 +1,14 @@
shader_type canvas_item;
void vertex() {
VERTEX.y = sin(TIME);
}
void fragment() {
// Called for every pixel the material is visible on.
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}

View file

@ -0,0 +1 @@
uid://djppqek35tujs

Binary file not shown.