2. versuch an Global illumination HOLLY HELL
This commit is contained in:
+5
-5
@@ -27,11 +27,11 @@ RGBA getRayColor(RGBA colorList[], bool isLightList[]) {
|
||||
|
||||
if (firstLightHitIndex == -1) {
|
||||
//rayColor = (RGBA){GLOBALILLUMINATION * colorList[0].r,GLOBALILLUMINATION * colorList[0].g,GLOBALILLUMINATION * colorList[0].b,1};
|
||||
rayColor = (RGBA){0,0,0,1};
|
||||
return rayColor;
|
||||
//rayColor = (RGBA){0,0,0,1};
|
||||
//return rayColor;
|
||||
isLightList[lightBounces - 1] = 1;
|
||||
colorList[lightBounces - 1] = (RGBA){1,1,1,1};
|
||||
}
|
||||
else
|
||||
{
|
||||
//pixel.r += spheresHitList[firstLightHitIndex]->color.r;
|
||||
//pixel.g += spheresHitList[firstLightHitIndex]->color.g;
|
||||
//pixel.b += spheresHitList[firstLightHitIndex]->color.b;
|
||||
@@ -46,7 +46,7 @@ RGBA getRayColor(RGBA colorList[], bool isLightList[]) {
|
||||
//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};
|
||||
return rayColor;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user