diff --git a/examples/Projet/Shoot_them_up_test.cpp b/examples/Projet/Shoot_them_up_test.cpp new file mode 100644 index 0000000..d760414 --- /dev/null +++ b/examples/Projet/Shoot_them_up_test.cpp @@ -0,0 +1,135 @@ +// Définition des couleurs +#define BLACK 0xFF000000 +#define WHITE 0xFFFFFFFF +#define RED 0xFF0000FF +#define GREEN 0xFF00FF00 +#define BLUE 0xFFFF0000 +#define YELLOW 0xFF00FFFF +#define CYAN 0xFFFFFF00 +#define MAGENTA 0xFFFF00FF + +// Variables globales pour suivre l'état des carrés +bool isErased1 = false; +bool isErased2 = false; +bool isErased3 = false; +bool isErased4 = false; +bool isErased5 = false; // Suivre si le premier carré est effacé +// Vous pouvez créer de nombreuses variables comme celles-ci pour d'autres carrés si nécessaire + +uint x = gl_GlobalInvocationID.x; +uint y = gl_GlobalInvocationID.y; +uint p = x + y * WSX; + +// Fonction de hachage pour la génération aléatoire +uint wang_hash(uint seed) { + seed = (seed ^ 61) ^ (seed >> 16); + seed *= 9; + seed = seed ^ (seed >> 4); + seed *= 0x27d4eb2d; + seed = seed ^ (seed >> 15); + return seed; +} + +// Fonction pour dessiner un carré +void drawSquare(uint centerX, uint centerY, uint size, uint couleur) { + if (x >= centerX - size && x <= centerX + size && + y >= centerY - size && y <= centerY + size) { + + if (couleur == 1) { + data_0[p] = RED; + } else if (couleur == 2) { + data_0[p] = BLUE; + } else if (couleur == 3) { + data_0[p] = GREEN; + } else if (couleur == 4) { + data_0[p] = YELLOW; + } else if (couleur == 5) { + data_0[p] = CYAN; + } else if (couleur == 6) { + data_0[p] = MAGENTA; + } + } +} + +// Fonction principale +void main() { + // Remplir l'écran en noir au premier frame + if (step == 0) { + data_0[p] = BLACK; + + + } + + + uint seed = 12345; + + uint centerX1 = 100 + wang_hash(seed + step) % 880; + uint centerY1 = 100 + wang_hash(seed + step) % 880; + uint size1 = 20 + wang_hash(seed + step) % 60; + uint color1 = 1 + wang_hash(seed + step) % 6; + + uint centerX2 = 100 + wang_hash(seed+ step + 50) % 880; + uint centerY2 = 100 + wang_hash(seed + step+ 60) % 880; + uint size2 = 20 + wang_hash(seed + step+ 70) % 60; + uint color2 = 1 + wang_hash(seed + step+ 80) % 6; + + uint centerX3 = 100 + wang_hash(seed+ step + 90) % 880; + uint centerY3 = 100 + wang_hash(seed + step+ 100) % 880; + uint size3 = 20 + wang_hash(seed+ step + 110) % 60; + uint color3 = 1 + wang_hash(seed + step+ 120) % 6; + + uint centerX4 = 100 + wang_hash(seed + step+ 130) % 880; + uint centerY4 = 100 + wang_hash(seed + step+ 140) % 880; + uint size4 = 20 + wang_hash(seed + step+ 150) % 60; + uint color4 = 1 + wang_hash(seed + step+ 160) % 6; + + uint centerX5 = 100 + wang_hash(seed+ step + 170) % 880; + uint centerY5 = 100 + wang_hash(seed + step+ 180) % 880; + uint size5 = 20 + wang_hash(seed+ step + 190) % 60; + uint color5 = 1 + wang_hash(seed + step+ 200) % 6; + + + + drawSquare(1000, 50, 30,1); + + // Utiliser une graine fixe pour avoir des positions stables + + + // Coordonnées et taille du premier carré + + + // Si le carré n'a pas été effacé, dessiner + if (step == 1) { + drawSquare(centerX1, centerY1, size1, color1); + drawSquare(centerX2, centerY2, size2, color2); + drawSquare(centerX3, centerY3, size3, color3); + drawSquare(centerX4, centerY4, size4, color4); + drawSquare(centerX5, centerY5, size5, color5); + } + + if (mouse_button > 0) { + if (mousex >= 1000 - 30 && mousex <= 1000 + 30 && + mousey >= 50 - 30 && mousey <= 50 + 30) { + + drawSquare(centerX1, centerY1, size1, color1); + } + } + + + // Vérification si la souris est dans la zone du carré + if (mouse_button > 0) { + if (mousex >= centerX1 - size1 && mousex <= centerX1 + size1 && + mousey >= centerY1 - size1 && mousey <= centerY1 + size1) { + + // Effacer le carré en changeant la couleur à noir + data_0[p] = BLACK; + isErased1 = true; // Marquer l'état comme effacé + }else if (mousex >= centerX2 - size2 && mousex <= centerX2 + size2 && + mousey >= centerX2 - size2 && mousey <= centerX2 + size2) { + + // Effacer le carré en changeant la couleur à noir + data_0[p] = BLACK; + isErased2 = true; // Marquer l'état comme effacé + } + } +} diff --git a/examples/Projet/projet.cpp b/examples/Projet/projet.cpp new file mode 100644 index 0000000..030a71e --- /dev/null +++ b/examples/Projet/projet.cpp @@ -0,0 +1,225 @@ +#define BLACK 0xFF000000 +#define RED 0xFF0000FF +#define GREEN 0xFF00FF00 +#define BLUE 0xFFFF0000 +#define COLLISION_MARKER 0xFFFF00FF +#define WHITE 0xFFFFFFFF +#define YELLOW 0xFF00FFFF +#define CYAN 0xFFFFFF00 +#define MAGENTA 0xFFFF00FF +#define ORANGE 0xFF0080FF +#define PURPLE 0xFF800080 +#define PINK 0xFFFFAFAF +#define BROWN 0xFF4F2F0F +#define GRAY 0xFF808080 +#define LIGHT_GRAY 0xFFC0C0C0 +#define DARK_GRAY 0xFF404040 + +void circle(uint cx, uint cy, uint rayon, int epaisseur) { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + + if ((x - cx) * (x - cx) + (y - cy) * (y - cy) >= (rayon - epaisseur) * (rayon - epaisseur) && + (x - cx) * (x - cx) + (y - cy) * (y - cy) <= rayon * rayon) { + data_0[p] = RED; + } +} + +void circleFull(uint cx, uint cy, uint rayon, uint indice) { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + if(indice == 1){ + if ((x - cx) * (x - cx) + (y - cy) * (y - cy) <= rayon * rayon) { + data_0[p] = BLUE; + } + } else if(indice == 2){ + if ((x - cx) * (x - cx) + (y - cy) * (y - cy) <= rayon * rayon) { + data_0[p] = RED; + } + } +} + +bool checkCollision(uint cx, uint cy, uint radius, uint couleur) { + for (int angle = 0; angle < 360; angle += 15) { + float radians = float(angle) * 3.14159 / 180.0; + uint checkX = cx + uint(float(radius) * cos(radians)); + uint checkY = cy + uint(float(radius) * sin(radians)); + + if (checkX < WSX && checkY < WSY) { + uint checkP = checkX + checkY * WSX; + + if (data_0[checkP] == couleur) { + return true; + } + } + } + return false; +} + +void drawSquare(uint centerX, uint centerY, uint size, uint couleur) { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + if (x >= centerX - size && x <= centerX + size && + y >= centerY - size && y <= centerY + size) { + + if (couleur == 1) { + data_0[p] = DARK_GRAY; + } else if (couleur == 2) { + data_0[p] = YELLOW; + } else if (couleur == 3) { + data_0[p] = GREEN; + } else if (couleur == 4) { + data_0[p] = BLACK; + } else if (couleur == 5) { + data_0[p] = WHITE; + } else if (couleur == 6) { + data_0[p] = YELLOW; + } else if (couleur == 7) { + data_0[p] = CYAN; + } else if (couleur == 8) { + data_0[p] = MAGENTA; + } else if (couleur == 9) { + data_0[p] = ORANGE; + } else if (couleur == 10) { + data_0[p] = PURPLE; + } else if (couleur == 11) { + data_0[p] = PINK; + } else if (couleur == 12) { + data_0[p] = BROWN; + } else if (couleur == 13) { + data_0[p] = GRAY; + } else if (couleur == 14) { + data_0[p] = LIGHT_GRAY; + } else if (couleur == 15) { + data_0[p] = DARK_GRAY; + } + + + + + } +} + + +void drawCross(uint cx, uint cy, uint radius, uint thickness) { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + + if ((x - cx) * (x - cx) + (y - cy) * (y - cy) >= (radius - thickness) * (radius - thickness) && + (x - cx) * (x - cx) + (y - cy) * (y - cy) <= radius * radius) { + data_0[p] = WHITE; + } + + if ((y >= cy - thickness && y <= cy + thickness && x >= cx - radius && x <= cx + radius) || + (x >= cx - thickness && x <= cx + thickness && y >= cy - radius && y <= cy + radius)) { + data_0[p] = WHITE; +} +} + +uint wang_hash(uint seed) { + seed = (seed ^ 61) ^ (seed >> 16); + seed *= 9; + seed = seed ^ (seed >> 4); + seed *= 0x27d4eb2d; + seed = seed ^ (seed >> 15); + return seed; +} + +void main() { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + + uint seed = 12345; + + uint centerX1 = 100 + wang_hash(seed + step) % 880; + uint centerY1 = 100 + wang_hash(seed + step) % 880; + uint size1 = 20 + wang_hash(seed + step) % 60; + uint color1 = 1 + wang_hash(seed + step) % 6; + + if (step == 1) { + drawSquare(centerX1, centerY1, size1, color1); + } + + bool hasCollided = (data_0[0] == COLLISION_MARKER); + + if (p != 0) { + data_0[p] = BLACK; + } + + drawSquare(1000, 50, 30, 1); + drawCross(mousex, mousey, 50, 3); + + // Agrandissement du cercle + circle(540, 540, 300, 20); // Le rayon du cercle est maintenant de 300 + + uint movingCircleRadius = 30; + uint centerX = 540; + + float amplitude = 270.0; + float frequency = 0.05; + float sinValue = sin(float(step) * frequency); + uint normalY = uint(540.0 + amplitude * sinValue); + uint invertedY = uint(540.0 - amplitude * sinValue); + + if (mouse_button > 0) { + if (mousex >= centerX1 - size1 && mousex <= centerX1 + size1 && + mousey >= centerY1 - size1 && mousey <= centerY1 + size1) { + + // Effacer le carré en changeant la couleur à noir + data_0[p] = BLACK; + + } + } + + if (mouse_button > 0) { + if ((mousex - centerX) * (mousex - centerX) + (mousey - normalY) * (mousey - normalY) <= movingCircleRadius * movingCircleRadius) { + data_0[p] = CYAN; + drawSquare(mousex, mousey, 5, 7); + } + } + + if (mouse_button > 0) { + if (mousex >= 1000 - 30 && mousex <= 1000 + 30 && + mousey >= 50 - 30 && mousey <= 50 + 30) { + + for (uint i = 0; i < step +2; i++) { + uint size = step - (i * 10); + if (size > 0) { + drawSquare(540, 540, size, (i + step / 30) % 15 + 1); + } + } + } + } + + uint newcolor; + if (!hasCollided) { + newcolor = 2; + circleFull(centerX, normalY, movingCircleRadius, newcolor); + } else { + newcolor = 1; + circleFull(centerX, invertedY, movingCircleRadius, newcolor); + } + + // Ajout du mouvement libre de la boule à l'intérieur du cercle + float angle = float(step) * frequency; + uint newX = uint(centerX + amplitude * cos(angle)); // Position X dans le cercle + uint newY = uint(540.0 + amplitude * sin(angle)); // Position Y dans le cercle + + // Déplacer la boule à n'importe où dans le cercle en fonction du mouvement de la souris + if (mouse_button > 0) { + if ((mousex - newX) * (mousex - newX) + (mousey - newY) * (mousey - newY) <= movingCircleRadius * movingCircleRadius) { + data_0[p] = CYAN; + } + } + + // Dessiner la boule à la nouvelle position calculée + circleFull(newX, newY, movingCircleRadius, 2); // 2 représente la couleur de la boule en mouvement +} + + + diff --git a/examples/Projet/projet2.cpp b/examples/Projet/projet2.cpp new file mode 100644 index 0000000..1ceb765 --- /dev/null +++ b/examples/Projet/projet2.cpp @@ -0,0 +1,114 @@ +#define BLACK 0xFF000000 +#define WHITE 0xFFFFFFFF +#define RED 0xFF0000FF +#define GREEN 0xFF00FF00 +#define BLUE 0xFFFF0000 +#define YELLOW 0xFF00FFFF +#define CYAN 0xFFFFFF00 +#define MAGENTA 0xFFFF00FF +#define ORANGE 0xFF0080FF +#define PURPLE 0xFF800080 +#define PINK 0xFFFFAFAF +#define BROWN 0xFF4F2F0F +#define GRAY 0xFF808080 +#define LIGHT_GRAY 0xFFC0C0C0 +#define DARK_GRAY 0xFF404040 + +uint x = gl_GlobalInvocationID.x; +uint y = gl_GlobalInvocationID.y; +uint p = x + y * WSX; + +void drawSquare(uint centerX, uint centerY, uint size, uint couleur) { + if (x >= centerX - size && x <= centerX + size && + y >= centerY - size && y <= centerY + size) { + + if (couleur == 1) { + data_0[p] = RED; + } else if (couleur == 2) { + data_0[p] = BLUE; + } else if (couleur == 3) { + data_0[p] = GREEN; + } else if (couleur == 4) { + data_0[p] = BLACK; + } else if (couleur == 5) { + data_0[p] = WHITE; + } else if (couleur == 6) { + data_0[p] = YELLOW; + } else if (couleur == 7) { + data_0[p] = CYAN; + } else if (couleur == 8) { + data_0[p] = MAGENTA; + } else if (couleur == 9) { + data_0[p] = ORANGE; + } else if (couleur == 10) { + data_0[p] = PURPLE; + } else if (couleur == 11) { + data_0[p] = PINK; + } else if (couleur == 12) { + data_0[p] = BROWN; + } else if (couleur == 13) { + data_0[p] = GRAY; + } else if (couleur == 14) { + data_0[p] = LIGHT_GRAY; + } else if (couleur == 15) { + data_0[p] = DARK_GRAY; + } + + + + + } +} + + +void circle(uint cx, uint cy, uint rayon, int epaisseur) { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + if ((x - cx) * (x - cx) + (y - cy) * (y - cy) >= (rayon - epaisseur) * (rayon - epaisseur) && + (x - cx) * (x - cx) + (y - cy) * (y - cy) <= rayon * rayon) { + data_0[p] = RED; + } +} + +void drawCross(uint cx, uint cy, uint radius) { + uint x = gl_GlobalInvocationID.x; + uint y = gl_GlobalInvocationID.y; + uint p = x + y * WSX; + + // Vérifier si on est sur le contour du cercle + if ((x - cx) * (x - cx) + (y - cy) * (y - cy) >= (radius - 1) * (radius - 1) && + (x - cx) * (x - cx) + (y - cy) * (y - cy) <= radius * radius) { + data_0[p] = WHITE; // Contour du cercle + } + + // Dessiner la croix (lignes horizontale et verticale) + if ((x >= cx - radius && x <= cx + radius && y == cy) || (y >= cy - radius && y <= cy + radius && x == cx)) { + data_0[p] = WHITE; // Lignes de la croix (blanches) + } +} + +void main() { + if (step == 0) { + data_0[p] = GREEN; + } + uint centerX = 540; + uint centerY = 540; + // for (uint i = 0; i < step +2; i++) { + // uint size = step - (i * 10); + // if (size > 0) { + // // drawSquare(270, 270, size, (i + step / 30) % 15 + 1); + // // drawSquare(810, 270, size, (i + step / 30) % 15 + 1); + // // drawSquare(270, 810, size, (i + step / 30) % 15 + 1); + // // drawSquare(810, 810, size, (i + step / 30) % 15 + 1); + // drawSquare(540, 540, size, (i + step / 30) % 15 + 1); + // } + // } + + //drawSquare(540, 540, 20, 1); + //circle(mousex, mousey, 50, 3); + + if ((mouse_button)> 0) { + circle(mousex, mousey, 50, 3); + } +} diff --git a/examples/Projet/projet_2_test.cpp b/examples/Projet/projet_2_test.cpp new file mode 100644 index 0000000..53bc9e3 --- /dev/null +++ b/examples/Projet/projet_2_test.cpp @@ -0,0 +1,187 @@ +#define BLACK 0xFF000000 +#define WHITE 0xFFFFFFFF +#define RED 0xFF0000FF +#define GREEN 0xFF00FF00 +#define BLUE 0xFFFF0000 +#define YELLOW 0xFF00FFFF +#define CYAN 0xFFFFFF00 +#define MAGENTA 0xFFFF00FF +#define ORANGE 0xFF0080FF +#define PURPLE 0xFF800080 +#define PINK 0xFFFFAFAF +#define BROWN 0xFF4F2F0F +#define GRAY 0xFF808080 +#define LIGHT_GRAY 0xFFC0C0C0 +#define DARK_GRAY 0xFF404040 + +int x = int(gl_GlobalInvocationID.x); // Conversion explicite en `int` +int y = int(gl_GlobalInvocationID.y); +int p = x + y * int(WSX); + +void drawRotatedSquare(int centerX, int centerY, int size, int couleur, float angle) { + float cosA = cos(angle); + float sinA = sin(angle); + + for (int dx = -size; dx <= size; dx++) { + for (int dy = -size; dy <= size; dy++) { + int xOrig = centerX + dx; + int yOrig = centerY + dy; + + // Rotation des coordonnées + int xRot = centerX + int(dx * cosA - dy * sinA); + int yRot = centerY + int(dx * sinA + dy * cosA); + + if (xRot >= 0 && xRot < int(WSX) && yRot >= 0 && yRot < int(WSY)) { + int pRot = xRot + yRot * int(WSX); + if (couleur == 1) { + data_0[pRot] = RED; + } else if (couleur == 2) { + data_0[pRot] = BLUE; + } else if (couleur == 3) { + data_0[pRot] = GREEN; + } else if (couleur == 4) { + data_0[pRot] = BLACK; + } else if (couleur == 5) { + data_0[pRot] = WHITE; + } else if (couleur == 6) { + data_0[pRot] = YELLOW; + } else if (couleur == 7) { + data_0[pRot] = CYAN; + } else if (couleur == 8) { + data_0[pRot] = MAGENTA; + } else if (couleur == 9) { + data_0[pRot] = ORANGE; + } else if (couleur == 10) { + data_0[pRot] = PURPLE; + } else if (couleur == 11) { + data_0[pRot] = PINK; + } else if (couleur == 12) { + data_0[pRot] = BROWN; + } else if (couleur == 13) { + data_0[pRot] = GRAY; + } else if (couleur == 14) { + data_0[pRot] = LIGHT_GRAY; + } else if (couleur == 15) { + data_0[pRot] = DARK_GRAY; + } + } + } + } +} + +void main() { + if (step == 0) { + data_0[p] = GREEN; + } + + float angle = (step / 50)%360 * 3.14159 / 180.0; + for (int i = 0; i < step +2; i++) { + int size = step - (i * 10); + if (size > 0) { + + drawRotatedSquare(540, 540, size, (i + step / 30) % 15 + 1, angle); + + } +} +} + + + + +// #define BLACK 0xFF000000 +// #define WHITE 0xFFFFFFFF +// #define RED 0xFF0000FF +// #define GREEN 0xFF00FF00 +// #define BLUE 0xFFFF0000 +// #define YELLOW 0xFF00FFFF +// #define CYAN 0xFFFFFF00 +// #define MAGENTA 0xFFFF00FF +// #define ORANGE 0xFF0080FF +// #define PURPLE 0xFF800080 +// #define PINK 0xFFFFAFAF +// #define BROWN 0xFF4F2F0F +// #define GRAY 0xFF808080 +// #define LIGHT_GRAY 0xFFC0C0C0 +// #define DARK_GRAY 0xFF404040 + +// int x = int(gl_GlobalInvocationID.x); +// int y = int(gl_GlobalInvocationID.y); +// int p = x + y * int(WSX); + +// // Matrice de rotation simplifiée +// void rotate(int inX, int inY, int centerX, int centerY, float cosA, float sinA, out int outX, out int outY) { +// int relX = inX - centerX; +// int relY = inY - centerY; + +// outX = centerX + int(relX * cosA - relY * sinA); +// outY = centerY + int(relX * sinA + relY * cosA); +// } + +// void drawRotatedSquare(int centerX, int centerY, int size, int couleur, float angle) { +// float cosA = cos(angle); +// float sinA = sin(angle); + +// int x1, y1, x2, y2, x3, y3, x4, y4; + +// // Calcul des 4 coins du carré +// rotate(centerX - size, centerY - size, centerX, centerY, cosA, sinA, x1, y1); +// rotate(centerX + size, centerY - size, centerX, centerY, cosA, sinA, x2, y2); +// rotate(centerX - size, centerY + size, centerX, centerY, cosA, sinA, x3, y3); +// rotate(centerX + size, centerY + size, centerX, centerY, cosA, sinA, x4, y4); + +// // On ne modifie que les bords du carré (pas l'intérieur) +// if ((x >= x1 && x <= x2 && (y == y1 || y == y3)) || +// (y >= y1 && y <= y3 && (x == x1 || x == x2))) { + +// int pRot = x + y * int(WSX); + +// // Choix de la couleur avec `if` +// if (couleur == 1) { +// data_0[pRot] = RED; +// } else if (couleur == 2) { +// data_0[pRot] = BLUE; +// } else if (couleur == 3) { +// data_0[pRot] = GREEN; +// } else if (couleur == 4) { +// data_0[pRot] = BLACK; +// } else if (couleur == 5) { +// data_0[pRot] = WHITE; +// } else if (couleur == 6) { +// data_0[pRot] = YELLOW; +// } else if (couleur == 7) { +// data_0[pRot] = CYAN; +// } else if (couleur == 8) { +// data_0[pRot] = MAGENTA; +// } else if (couleur == 9) { +// data_0[pRot] = ORANGE; +// } else if (couleur == 10) { +// data_0[pRot] = PURPLE; +// } else if (couleur == 11) { +// data_0[pRot] = PINK; +// } else if (couleur == 12) { +// data_0[pRot] = BROWN; +// } else if (couleur == 13) { +// data_0[pRot] = GRAY; +// } else if (couleur == 14) { +// data_0[pRot] = LIGHT_GRAY; +// } else if (couleur == 15) { +// data_0[pRot] = DARK_GRAY; +// } +// } +// } + +// void main() { +// if (step == 0) { +// data_0[p] = GREEN; +// } + +// // Réduction de la vitesse de rotation +// float angle = (step / 20.0) * 3.14159 / 180.0; + +// for (int i = 0; i < step +2; i++) { +// int size = step - (i * 10); +// if (size > 0) { +// drawRotatedSquare(540, 540, size, (i + step / 30) % 15 + 1, angle); +// } +// } +// } diff --git a/examples/Projet/projet_liam_frit.tscn b/examples/Projet/projet_liam_frit.tscn new file mode 100644 index 0000000..aca52b0 --- /dev/null +++ b/examples/Projet/projet_liam_frit.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=3 format=3 uid="uid://bonxt31s15o3g"] + +[ext_resource type="Script" path="res://addons/compute_shader_studio/compute_shader_studio_2d.gd" id="1_8kd26"] +[ext_resource type="Texture2D" uid="uid://demftcowdd5c6" path="res://examples/icon.svg" id="2_5doh8"] + +[node name="ProjetLiamFrit" type="Node2D"] + +[node name="ComputeShaderStudio2D" type="Node" parent="." node_paths=PackedStringArray("data")] +script = ExtResource("1_8kd26") +WSX = 1080 +WSY = 1080 +glsl_file = "res://examples/Projet/projet.cpp" +GLSL_code = "" +data = [NodePath("../Icon")] + +[node name="Icon" type="Sprite2D" parent="."] +position = Vector2(435.875, 235) +scale = Vector2(3.92383, 3.43359) +texture = ExtResource("2_5doh8") diff --git a/examples/example_1.tscn b/examples/example_1.tscn index 4d271f5..9b4fac1 100644 --- a/examples/example_1.tscn +++ b/examples/example_1.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=5 format=3 uid="uid://ddr6qtwy1pesd"] -[ext_resource type="Script" uid="uid://c8esqdv0y26yp" path="res://addons/compute_shader_studio/compute_shader_studio_2d.gd" id="1_6846p"] +[ext_resource type="Script" path="res://addons/compute_shader_studio/compute_shader_studio_2d.gd" id="1_6846p"] [ext_resource type="Texture2D" uid="uid://demftcowdd5c6" path="res://examples/icon.svg" id="2_s3fct"] [sub_resource type="FastNoiseLite" id="FastNoiseLite_dmk8h"] diff --git a/project.godot b/project.godot index 1617345..0436dd7 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="compute_shader_studio" run/main_scene="res://examples/example_1.tscn" -config/features=PackedStringArray("4.4", "Forward Plus") +config/features=PackedStringArray("4.2", "Forward Plus") config/icon="res://addons/compute_shader_studio/icon.png" [editor_plugins]