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.

BIN
exo1/assets/GroundTile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2ln6in2cciqc"
path="res://.godot/imported/GroundTile.png-28d192c8897351185d26f52b7bd4107a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo1/assets/GroundTile.png"
dest_files=["res://.godot/imported/GroundTile.png-28d192c8897351185d26f52b7bd4107a.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=1
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

BIN
exo1/assets/logo-CELL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4g6qnykfjdba"
path="res://.godot/imported/logo-CELL.png-32c131f8ba4da21dff7740152eee3471.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo1/assets/logo-CELL.png"
dest_files=["res://.godot/imported/logo-CELL.png-32c131f8ba4da21dff7740152eee3471.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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b0isklem0n1d1"
path="res://.godot/imported/painting_frame.png-b4161477b82cf188b2b3891943bf817a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo1/assets/painting_frame.png"
dest_files=["res://.godot/imported/painting_frame.png-b4161477b82cf188b2b3891943bf817a.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

18
exo1/cam_follow.gd Normal file
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)

1
exo1/cam_follow.gd.uid Normal file
View file

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

515
exo1/exo1.tscn Normal file
View file

@ -0,0 +1,515 @@
[gd_scene load_steps=40 format=3 uid="uid://pvjist0vg8ah"]
[ext_resource type="Shader" uid="uid://dvegch8bn85w4" path="res://exo1/shaders/pastouche/ground.gdshader" id="1_nj86p"]
[ext_resource type="Texture2D" uid="uid://d2ln6in2cciqc" path="res://exo1/assets/GroundTile.png" id="2_1460h"]
[ext_resource type="Script" uid="uid://dtwr10xf504og" path="res://exo1/cam_follow.gd" id="3_dd5tk"]
[ext_resource type="PackedScene" uid="uid://hb5qh45e6x1s" path="res://pas_touche/inter_exo/lana.tscn" id="4_j5uwi"]
[ext_resource type="Texture2D" uid="uid://b0isklem0n1d1" path="res://exo1/assets/painting_frame.png" id="6_mi18a"]
[ext_resource type="Shader" uid="uid://bqkbm7kxjbvbl" path="res://exo1/shaders/exo1_tableaux/1uv_painting_example.gdshader" id="7_q8ng3"]
[ext_resource type="Shader" uid="uid://u4ti6qojfd6n" path="res://exo1/shaders/exo1_tableaux/2diagonale.gdshader" id="8_mk50y"]
[ext_resource type="Texture2D" uid="uid://bbqjjcli4roq5" path="res://exo1/screenshot_goal/Soluce_Diagonale.png" id="9_0dfpm"]
[ext_resource type="Shader" uid="uid://tueskvsn60l0" path="res://exo1/shaders/exo1_tableaux/3circle.gdshader" id="10_56yv0"]
[ext_resource type="Texture2D" uid="uid://d8mtqjjcrh7m" path="res://exo1/screenshot_goal/circle.png" id="11_5c586"]
[ext_resource type="Shader" uid="uid://uusggwbep2j4" path="res://exo1/shaders/exo1_tableaux/4uv_time.gdshader" id="12_1swba"]
[ext_resource type="Shader" uid="uid://clc4aqodbhhv5" path="res://exo1/shaders/exo1_tableaux/5circle_time.gdshader" id="13_ven0y"]
[ext_resource type="Shader" uid="uid://03ee6p7b6pnn" path="res://exo1/shaders/exo1_zexemples_jolies/plasma.gdshader" id="14_hyh6e"]
[ext_resource type="Shader" uid="uid://d0n6gjxkt6okq" path="res://exo1/shaders/exo1_zexemples_jolies/mandelbrot.gdshader" id="15_5klk2"]
[ext_resource type="Shader" uid="uid://sl1g7w1jmk6x" path="res://exo1/shaders/exo1_zexemples_jolies/zolie_user.gdshader" id="16_mpwm1"]
[ext_resource type="Shader" uid="uid://bjw6mgbjij8fc" path="res://exo1/shaders/exo1_zexemples_jolies/zolie_user2.gdshader" id="17_kjdq4"]
[sub_resource type="Gradient" id="Gradient_fqaua"]
interpolation_mode = 2
colors = PackedColorArray(0.650128, 0.650128, 0.650128, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_c3ei3"]
gradient = SubResource("Gradient_fqaua")
height = 1024
fill_from = Vector2(1, 1)
repeat = 1
[sub_resource type="ShaderMaterial" id="ShaderMaterial_disjo"]
shader = ExtResource("1_nj86p")
shader_parameter/skew_amount = 0.25
[sub_resource type="Gradient" id="Gradient_c3ei3"]
interpolation_mode = 2
colors = PackedColorArray(0.650128, 0.650128, 0.650128, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_u32k3"]
gradient = SubResource("Gradient_c3ei3")
height = 1024
fill_from = Vector2(1, 1)
repeat = 1
[sub_resource type="RectangleShape2D" id="RectangleShape2D_v6q5x"]
size = Vector2(4342, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_disjo"]
size = Vector2(128, 392.919)
[sub_resource type="LabelSettings" id="LabelSettings_ipmo5"]
font_size = 32
font_color = Color(0.10748, 0.10748, 0.10748, 1)
[sub_resource type="LabelSettings" id="LabelSettings_y65yk"]
font_color = Color(0.10748, 0.10748, 0.10748, 1)
[sub_resource type="LabelSettings" id="LabelSettings_u32k3"]
font_color = Color(0.10748, 0.10748, 0.10748, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_l1x0l"]
shader = ExtResource("7_q8ng3")
[sub_resource type="Gradient" id="Gradient_u32k3"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_l1x0l"]
gradient = SubResource("Gradient_u32k3")
width = 180
height = 116
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u32k3"]
shader = ExtResource("8_mk50y")
[sub_resource type="Gradient" id="Gradient_l1x0l"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_m5f4m"]
gradient = SubResource("Gradient_l1x0l")
width = 180
height = 116
[sub_resource type="ShaderMaterial" id="ShaderMaterial_y65yk"]
shader = ExtResource("10_56yv0")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_yru7n"]
shader = ExtResource("12_1swba")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_nqvhh"]
shader = ExtResource("13_ven0y")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2n602"]
shader = ExtResource("14_hyh6e")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xyfjg"]
shader = ExtResource("15_5klk2")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pj7t7"]
shader = ExtResource("16_mpwm1")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_swa6w"]
shader = ExtResource("17_kjdq4")
[node name="Exo1" type="Node2D"]
[node name="PasTouche" type="Node2D" parent="."]
[node name="WallBG" type="Node2D" parent="PasTouche"]
position = Vector2(-19, -361)
[node name="Sprite2D" type="Sprite2D" parent="PasTouche/WallBG"]
texture = SubResource("GradientTexture2D_c3ei3")
region_enabled = true
region_rect = Rect2(0, 0, 10240, 1024)
[node name="Ground" type="Sprite2D" parent="PasTouche"]
texture_filter = 1
texture_repeat = 3
material = SubResource("ShaderMaterial_disjo")
position = Vector2(0, 160)
texture = ExtResource("2_1460h")
region_enabled = true
region_rect = Rect2(0, 0, 8192, 320)
[node name="LeftWall" type="Sprite2D" parent="PasTouche"]
position = Vector2(-2591, 171)
rotation = -0.234771
texture = SubResource("GradientTexture2D_u32k3")
region_enabled = true
region_rect = Rect2(0, 0, 1024, 2024)
[node name="LeftWall2" type="Sprite2D" parent="PasTouche"]
position = Vector2(2562, -15.9999)
rotation = -0.234771
texture = SubResource("GradientTexture2D_u32k3")
region_enabled = true
region_rect = Rect2(0, 0, 1024, 2024)
[node name="GlobalCollider" type="StaticBody2D" parent="PasTouche"]
[node name="Top" type="CollisionShape2D" parent="PasTouche/GlobalCollider"]
position = Vector2(0, -11)
shape = SubResource("RectangleShape2D_v6q5x")
[node name="Bottom" type="CollisionShape2D" parent="PasTouche/GlobalCollider"]
position = Vector2(0, 324)
shape = SubResource("RectangleShape2D_v6q5x")
[node name="Right" type="CollisionShape2D" parent="PasTouche/GlobalCollider"]
position = Vector2(-2140.2, 130.01)
rotation = -0.240294
shape = SubResource("RectangleShape2D_disjo")
[node name="Left" type="CollisionShape2D" parent="PasTouche/GlobalCollider"]
position = Vector2(2135, 139)
rotation = -0.217829
shape = SubResource("RectangleShape2D_disjo")
[node name="CamExo1" type="Camera2D" parent="PasTouche" node_paths=PackedStringArray("lana")]
position = Vector2(0, -192)
script = ExtResource("3_dd5tk")
lana = NodePath("../Lana")
lerp_speed = null
[node name="Lana" parent="PasTouche" instance=ExtResource("4_j5uwi")]
position = Vector2(-1670, 126)
[node name="Tableaux" type="Node2D" parent="."]
position = Vector2(-1500, -190)
[node name="Labels" type="Node2D" parent="Tableaux"]
[node name="Label" type="Label" parent="Tableaux/Labels"]
offset_left = -645.0
offset_top = -305.0
offset_right = -259.0
offset_bottom = -256.0
text = "EXERCICE 1"
label_settings = SubResource("LabelSettings_ipmo5")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/Labels/Label"]
layout_mode = 0
offset_left = 65.0
offset_top = 54.0
offset_right = 451.0
offset_bottom = 207.0
text = "On va faire des beaux tableaux
et voir la fonction fragment des
shaders, pour faire cette exo
il suffit juste de modifier les
shaders qui sont dans
exo1/shaders/exo1_tableaux"
label_settings = SubResource("LabelSettings_y65yk")
[node name="Label2" type="Label" parent="Tableaux/Labels"]
offset_left = 462.0
offset_top = -305.0
offset_right = 848.0
offset_bottom = -256.0
label_settings = SubResource("LabelSettings_ipmo5")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/Labels/Label2"]
layout_mode = 0
offset_left = 23.0
offset_top = 26.0
offset_right = 363.0
offset_bottom = 179.0
text = "Bon c'est cool COLOR et UV
Mais ca bouge pas trop...
Autant faire du dessin, c'est bof les shaders.
ET BIEN NON
Il existe aussi TIME
qui permet de faire
des trucs rigolos"
label_settings = SubResource("LabelSettings_y65yk")
[node name="Label3" type="Label" parent="Tableaux/Labels"]
offset_left = 1123.0
offset_top = -282.0
offset_right = 1509.0
offset_bottom = -233.0
text = "Vous avez fini l'exo 1"
label_settings = SubResource("LabelSettings_ipmo5")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/Labels/Label3"]
layout_mode = 0
offset_left = 40.0
offset_top = 54.0
offset_right = 426.0
offset_bottom = 207.0
text = "Bien joue !!
Vous etes des vrais artistes!!
J'ai mis quelques exemples de tableaux que
vous pouvez faire avec un peu plus de temps"
label_settings = SubResource("LabelSettings_y65yk")
[node name="Label4" type="Label" parent="Tableaux/Labels"]
offset_left = 2043.0
offset_top = -294.0
offset_right = 2429.0
offset_bottom = -245.0
text = "Vers l'exo 2"
label_settings = SubResource("LabelSettings_ipmo5")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/Labels/Label4"]
layout_mode = 0
offset_left = 40.0
offset_top = 54.0
offset_right = 426.0
offset_bottom = 207.0
text = "Bon c'est bien sympa de faire des
beaux tableaux mais c'est pas l'utilisation
principale des shaders dans les jeux.
Dans l'exo 2 on va voir des exemples
de trucs plus utiles
(cascade, effets sous l'eau etc...)"
label_settings = SubResource("LabelSettings_y65yk")
[node name="UVFrame" type="Sprite2D" parent="Tableaux"]
position = Vector2(-229, 59)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/UVFrame"]
offset_left = -192.0
offset_top = -93.0
offset_right = 194.0
offset_bottom = -44.0
text = "1) Exemple UV"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/UVFrame"]
offset_left = -192.0
offset_top = 64.0
offset_right = 194.0
offset_bottom = 113.0
text = "1uv_painting_example.gdshader"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="UVPainting" type="Sprite2D" parent="Tableaux/UVFrame"]
material = SubResource("ShaderMaterial_l1x0l")
texture = SubResource("GradientTexture2D_l1x0l")
[node name="DiagonaleFrame" type="Sprite2D" parent="Tableaux"]
position = Vector2(48, -35)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/DiagonaleFrame"]
offset_left = -248.0
offset_top = -118.0
offset_right = 264.0
offset_bottom = -17.0
text = "2) Diagonale
Essaye de decouper le tableau (comme en haut)
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/DiagonaleFrame"]
offset_left = -248.0
offset_top = 68.0
offset_right = 264.0
offset_bottom = 169.0
text = "2diagonale.gdshader
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="LinePainting" type="Sprite2D" parent="Tableaux/DiagonaleFrame"]
material = SubResource("ShaderMaterial_u32k3")
texture = SubResource("GradientTexture2D_m5f4m")
[node name="ScreenshotGoal" type="Sprite2D" parent="Tableaux/DiagonaleFrame"]
position = Vector2(-2, -191)
texture = ExtResource("9_0dfpm")
[node name="CircleFrame" type="Sprite2D" parent="Tableaux"]
position = Vector2(348, 31)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/CircleFrame"]
offset_left = -253.0
offset_top = -118.0
offset_right = 259.0
offset_bottom = -17.0
text = "3) Cercle
Fais un cercle (comme en haut)"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/CircleFrame"]
offset_left = -253.0
offset_top = 69.0
offset_right = 259.0
offset_bottom = 170.0
text = "3circle.gdshader
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="CirclePainting" type="Sprite2D" parent="Tableaux/CircleFrame"]
material = SubResource("ShaderMaterial_y65yk")
texture = SubResource("GradientTexture2D_m5f4m")
[node name="Circle" type="Sprite2D" parent="Tableaux/CircleFrame"]
position = Vector2(3, -193)
scale = Vector2(0.42, 0.42)
texture = ExtResource("11_5c586")
[node name="UVFrameTime" type="Sprite2D" parent="Tableaux"]
position = Vector2(691, 36)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/UVFrameTime"]
offset_left = -192.0
offset_top = -93.0
offset_right = 194.0
offset_bottom = -44.0
text = "4) Exemple UV TIME"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/UVFrameTime"]
offset_left = -192.0
offset_top = 64.0
offset_right = 194.0
offset_bottom = 113.0
text = "4uv_time"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="UVPainting" type="Sprite2D" parent="Tableaux/UVFrameTime"]
material = SubResource("ShaderMaterial_yru7n")
texture = SubResource("GradientTexture2D_l1x0l")
[node name="CircleFrameTime" type="Sprite2D" parent="Tableaux"]
position = Vector2(933, -28)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/CircleFrameTime"]
offset_left = -253.0
offset_top = -139.0
offset_right = 259.0
offset_bottom = -38.0
text = "5) Faites des cercles concentriques
qui bougent"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/CircleFrameTime"]
offset_left = -253.0
offset_top = 69.0
offset_right = 259.0
offset_bottom = 170.0
text = "3circle.gdshader
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="CirclePainting" type="Sprite2D" parent="Tableaux/CircleFrameTime"]
material = SubResource("ShaderMaterial_nqvhh")
texture = SubResource("GradientTexture2D_m5f4m")
[node name="PlasmaFrame" type="Sprite2D" parent="Tableaux"]
position = Vector2(1274, 63)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/PlasmaFrame"]
offset_left = -253.0
offset_top = -95.0
offset_right = 259.0
offset_bottom = 6.0
text = "plasma"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/PlasmaFrame"]
offset_left = -253.0
offset_top = 69.0
offset_right = 259.0
offset_bottom = 170.0
text = "zexemples_jolies
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="PlasmaPainting" type="Sprite2D" parent="Tableaux/PlasmaFrame"]
material = SubResource("ShaderMaterial_2n602")
texture = SubResource("GradientTexture2D_m5f4m")
[node name="MandelbrotFrame" type="Sprite2D" parent="Tableaux"]
position = Vector2(1557, -3)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/MandelbrotFrame"]
offset_left = -253.0
offset_top = -95.0
offset_right = 259.0
offset_bottom = 6.0
text = "mandelbrot zoom"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/MandelbrotFrame"]
offset_left = -253.0
offset_top = 69.0
offset_right = 259.0
offset_bottom = 170.0
text = "zexemples_jolies
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="MandelBrot" type="Sprite2D" parent="Tableaux/MandelbrotFrame"]
material = SubResource("ShaderMaterial_xyfjg")
texture = SubResource("GradientTexture2D_m5f4m")
[node name="ZolieUserFrame1" type="Sprite2D" parent="Tableaux"]
position = Vector2(1796, -225)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/ZolieUserFrame1"]
offset_left = -253.0
offset_top = -95.0
offset_right = 259.0
offset_bottom = 6.0
text = "Tu peux faire un truc joli ici stv"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/ZolieUserFrame1"]
offset_left = -253.0
offset_top = 69.0
offset_right = 259.0
offset_bottom = 170.0
text = "zexemples_jolies/zolie_user1
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="ZolieUser1" type="Sprite2D" parent="Tableaux/ZolieUserFrame1"]
material = SubResource("ShaderMaterial_pj7t7")
texture = SubResource("GradientTexture2D_m5f4m")
[node name="ZolieUserFrame2" type="Sprite2D" parent="Tableaux"]
position = Vector2(1869, 5)
texture = ExtResource("6_mi18a")
[node name="Label" type="Label" parent="Tableaux/ZolieUserFrame2"]
offset_left = -253.0
offset_top = -95.0
offset_right = 259.0
offset_bottom = 6.0
text = "Autre truc zolie de ta part"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="Tableaux/ZolieUserFrame2"]
offset_left = -250.0
offset_top = 70.0
offset_right = 262.0
offset_bottom = 171.0
text = "zexemples_jolies/zolie_user2
"
label_settings = SubResource("LabelSettings_u32k3")
horizontal_alignment = 1
[node name="ZolieUser2" type="Sprite2D" parent="Tableaux/ZolieUserFrame2"]
material = SubResource("ShaderMaterial_swa6w")
texture = SubResource("GradientTexture2D_m5f4m")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbqjjcli4roq5"
path="res://.godot/imported/Soluce_Diagonale.png-1a2fe9e3786537188d4d6ee9f643529c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo1/screenshot_goal/Soluce_Diagonale.png"
dest_files=["res://.godot/imported/Soluce_Diagonale.png-1a2fe9e3786537188d4d6ee9f643529c.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: 4.3 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d8mtqjjcrh7m"
path="res://.godot/imported/circle.png-9e02411ed0fb90fc5237e61e24f1ec8f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://exo1/screenshot_goal/circle.png"
dest_files=["res://.godot/imported/circle.png-9e02411ed0fb90fc5237e61e24f1ec8f.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

View file

@ -0,0 +1,26 @@
shader_type canvas_item;
// Un peu de lecture au debut, mais c'est important !
// J'ai fait au plus court pour vous bande de tiktok kids
// Mais c'est important et y'a que ca a lire
void fragment() {
// La fonction fragment() est appele pour chaque pixel du tableau a chaque frame
// Donc ici environ 28980 fois chaque frame, mais le GPU gere sans soucis !
// En input hidden, on a une variable global UV
// UV est un vecteur (x, y) avec x et y entre 0 et 1
// UV represente la position normalized du pixel
// (0, 0) c'est en haut a gauche et (1, 1) en bas a droite
COLOR.rgb = vec3(UV, 0);
// COLOR est une variable global, c'est un input et un output
// C'est la color du pixel qu'on traite
// Ici on dit que la couleur : red = UV.x et green = UV.y et blue a 0
// Et on voit que en haut a gauche c'est noir, et en bas a droite c'est jaune (red + green)
// TODO
// Fait des petites modifs de la seule ligne de ce programme pour voir ce que ca fait
// Mettre blue a 1 ou faire des modifs sur UV etc... testez des trucs !
}

View file

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

View file

@ -0,0 +1,9 @@
shader_type canvas_item;
void fragment() {
// Called for every pixel the material is visible on.
// Deux trucs a utiliser : UV et COLOR
// N'hesite pas a poser des questions (sur la syntaxe de glsl par exemple)
COLOR.rgb = vec3(0, 1, 0);
}

View file

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

View file

@ -0,0 +1,12 @@
shader_type canvas_item;
void fragment() {
// La fonction length renvoie la longeur d'un vec2, vec3 ou vec4
// la syntaxe c'est length(ton vecteur)
// ca donne plus une eclipse qu'un cercle
// Pour avoir un cercle faudrait normaliser avec TEXTURE_PIXEL_SIZE
// (qui donne la taille WIDTH et HEIGHT de notre canvas)
COLOR.rgb = vec3(0, 1, 1);
}

View file

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

View file

@ -0,0 +1,10 @@
shader_type canvas_item;
void fragment() {
// TIME est une variable globale qui contient le temps depuis lequel godot tourne
// sin, cos etc... sont super utilise avec TIME
// car ca permet d'avoir des trucs periodiques
COLOR.rgb = vec3(sin(UV.x + TIME), cos(UV.y + 2.0*TIME), sin(UV.x + UV.y + 3.0*TIME));
// parfois sin et cos peuvent valoir moins de 0
// Mais c'est pas grave c'
}

View file

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

View file

@ -0,0 +1,5 @@
shader_type canvas_item;
void fragment() {
// Bon vous avez tout les outils en main, testez des trucs
}

View file

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

View file

@ -0,0 +1,33 @@
shader_type canvas_item;
const int max_itter = 256;
const vec2 zoom_center = vec2(-0.74364388703, 0.13182590421);
int get_mandelbrot_count(vec2 uv, float zoom_factor){
vec2 scaled_uv = (uv - vec2(0.5)) * 4.0 * zoom_factor + zoom_center;
float c_re = scaled_uv.x;
float c_im = scaled_uv.y;
float re = 0.0;
float im = 0.0;
for (int i = 0; i < max_itter; i++){
float t_re = re;
re = re*re - im*im + c_re;
im = 2.0*im*t_re + c_im;
if (re*re + im*im > 4.0){
return i;
}
}
return 0;
}
void fragment() {
float smooth_sine = (sin(TIME) * 0.5 + 0.5);
float zoom_factor = mix(0.001, 1.0, smoothstep(0.0, 1.0, smooth_sine));
int mandelbrot_count = get_mandelbrot_count(UV, zoom_factor);
float m_cn = float(mandelbrot_count) / float(max_itter);
COLOR.rgb = vec3(m_cn, m_cn*2.0, m_cn*3.0);
}

View file

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

View file

@ -0,0 +1,8 @@
shader_type canvas_item;
void fragment() {
vec2 uv = UV;
float v = sin(uv.x * 10.0 + TIME) + sin(uv.y * 10.0 + TIME) + sin((uv.x + uv.y) * 10.0 + TIME);
float c = (sin(v) + 1.0) / 2.0;
COLOR = vec4(vec3(c, c * 0.5, 1.0 - c), 1.0);
}

View file

@ -0,0 +1 @@
uid://03ee6p7b6pnn

View file

@ -0,0 +1,6 @@
shader_type canvas_item;
void fragment() {
// Called for every pixel the material is visible on.
COLOR.br = UV;
}

View file

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

View file

@ -0,0 +1,7 @@
shader_type canvas_item;
void fragment() {
// Called for every pixel the material is visible on.
COLOR.gr = UV;
}

View file

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

View file

@ -0,0 +1,20 @@
shader_type canvas_item;
// ET OUI, MEME LE SOL C'EST UN SHADER
// Petite shader juste pour faire un ptit effet de perspective tiled sur le sol
// J'avais la flemme de faire des belles textures lol
uniform float skew_amount = 0.5;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec2 skewed_uv = UV;
skewed_uv.x += (1.0 - UV.y) * skew_amount;
COLOR = texture(TEXTURE, skewed_uv);
}
//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://dvegch8bn85w4