weirdes farb artefakte auf den kugeln wenn ein licht zu nah dran ist

This commit is contained in:
any
2026-07-30 18:12:19 +02:00
parent 82ab538095
commit 2ebc5f03bb
7 changed files with 31 additions and 4 deletions
+8 -3
View File
@@ -36,10 +36,11 @@ void exampleSphere( int width, int height, int channels, unsigned char **image)
cam1.screenDistance = 1;
cam1.width = 1.920;
cam1.height = 1.080;
vec3 sphereOrigin = (vec3){0,-2,5};
vec3 sphereOrigin = (vec3){0,-1.5,5};
double sphereRadius = 1.0;
int objectCount = 7;
sphere obj1 = (sphere){sphereOrigin, sphereRadius,(RGBA){1,0.5,1,1},0};
sphere **objectList = (sphere **) calloc(5+1, sizeof(sphere*));;
sphere **objectList = (sphere **) calloc(objectCount+1, sizeof(sphere*));;
objectList[0] = &obj1;
sphere obj2 = (sphere){vec3Add(sphereOrigin, (vec3){3,0,0}), sphereRadius, (RGBA){1,1,0.5,1},0};
objectList[1] = &obj2;
@@ -49,7 +50,11 @@ void exampleSphere( int width, int height, int channels, unsigned char **image)
objectList[3] = &obj4;
sphere light1 = (sphere){(vec3){1,1,4.5}, sphereRadius, (RGBA){1,1,1,1},1};
objectList[4] = &light1;
int objectCount = 5;
sphere obj5 = (sphere){(vec3){0, -6, 6.5}, 5, (RGBA){1,0.2,0.6,1},0};
objectList[5] = &obj5;
sphere light2 = (sphere){(vec3){1,-2,4}, sphereRadius, (RGBA){1,1,1,1},1};
objectList[6] = &light2;
displaySzene(objectList, objectCount, cam1, width, height, channels, image);