only reflections

This commit is contained in:
any
2026-07-26 20:56:07 +02:00
parent 1c4dce53c1
commit fb44398c24
3 changed files with 5 additions and 4 deletions
+3 -4
View File
@@ -37,15 +37,14 @@ RGBA raytraceSphere(sphere **objectList, ray *lightray) {
lightray->origin = nearestCollisionPoint;
}
else {
sphereNormal = (vec3){0,0,0};
sphereNormal = (vec3){1,1,1};
}
}
if (nearestSphere != nullptr)
{
//pixel.r = -vec3Product(sphereNormal, lightray->direction);
pixel = (RGBA){1 - 0.5 *( sphereNormal.x + 1), 1 - 0.5 * (sphereNormal.y +1), 1 -0.5* (sphereNormal.z + 1),1};
}
free(spheresHitList);
return pixel;