feat(title): paleta neon synthwave per element a l'escena de títol

This commit is contained in:
JailDesigner committed 2026-05-22 13:04:11 +02:00
1 parent 880af293ef
commit c61299f17f
5 files changed
+40 -10

No files matched your search

+5 -1
View File
@@ -94,7 +94,7 @@ namespace Graphics {
.rotation_euler = Vec3{.x = star.rot_phase_x, .y = star.rot_phase_y, .z = 0.0F},
.scale = star.scale,
};
drawWireframe(renderer_, *camera_, octahedron_, TRANSFORM, computeBrightness(star));
drawWireframe(renderer_, *camera_, octahedron_, TRANSFORM, computeBrightness(star), color_);
}
}
@@ -102,4 +102,8 @@ namespace Graphics {
brightness_mult_ = std::max(0.0F, multiplier);
}
void Starfield::setColor(SDL_Color color) {
color_ = color;
}
} // namespace Graphics
+4
View File
@@ -8,6 +8,8 @@
#pragma once
#include <SDL3/SDL.h>
#include <vector>
#include "core/graphics/camera3d.hpp"
@@ -25,6 +27,7 @@ namespace Graphics {
void draw() const;
void setBrightness(float multiplier);
void setColor(SDL_Color color);
private:
struct Star {
@@ -45,6 +48,7 @@ namespace Graphics {
std::vector<Star> stars_;
Mesh3D octahedron_;
float brightness_mult_{1.0F};
SDL_Color color_{.r = 0, .g = 0, .b = 0, .a = 0}; // alpha=0 → usa color global
// Volum de spawn / regeneració en l'espai 3D.
static constexpr float Z_NEAR_RESPAWN = 5.0F; // Si Z < aquest valor → regenera