a pretty i bug i might keep xd

This commit is contained in:
Mylloon 2023-05-12 18:17:35 +02:00
parent 58321c76a5
commit 1df635eb15
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ in vec3 vec_normal;
out vec4 fragColor; out vec4 fragColor;
const int max = 5; // should change in cpu too const int max = 20; // should change in cpu too
uniform vec4 couleur; uniform vec4 couleur;
uniform vec4 lum_pos[max]; uniform vec4 lum_pos[max];
@ -26,7 +26,7 @@ void main() {
if(i == 0) { if(i == 0) {
fragColor = color; fragColor = color;
} else { } else {
fragColor = mix(fragColor, color, i / 2.); fragColor = mix(fragColor, color, 1. * (i / 1));
} }
} }

View file

@ -9,7 +9,7 @@ struct manifestant {
GLfloat ox, oz; GLfloat ox, oz;
}; };
#define HEROS_NUMBER 5 // should change in fragment shader too #define HEROS_NUMBER 20 // should change in fragment shader too
static struct manifestant _herosId[HEROS_NUMBER]; static struct manifestant _herosId[HEROS_NUMBER];
static const char *matrix_proj = "proj"; static const char *matrix_proj = "proj";
@ -83,7 +83,7 @@ static void draw(void) {
gl4duFrustumf(-1, 1, -ratio, ratio, 1, 1000); gl4duFrustumf(-1, 1, -ratio, ratio, 1, 1000);
bindAndLoadf(matrix_view); bindAndLoadf(matrix_view);
const GLfloat distance = 10; // distance from the scene const GLfloat distance = 5; // distance from the scene
gl4duLookAtf(0, distance, distance, 0, 0, 0, 0, 1, 0); gl4duLookAtf(0, distance, distance, 0, 0, 0, 0, 1, 0);
// gl4duRotatef(-90, 0, 1, 0); // rotation camera // gl4duRotatef(-90, 0, 1, 0); // rotation camera