fixxed global illumination, aber bin mir nicht besser ob es besser ist, weil wirr jetzt farbliche noise haben. ausserdem ist dort immer noch schwarz. das sollte gar nicht mehr moeglich sein, was zeigt dass lichtstrahlen escapen
This commit is contained in:
+6
-4
@@ -7,9 +7,9 @@
|
||||
#include "helper.h"
|
||||
#include <math.h>
|
||||
#define epsilon 1e-8
|
||||
#define RAYSPERPIXEL 40
|
||||
#define RAYSPERPIXEL 10
|
||||
#define lightBounces 5
|
||||
#define GLOBALILLUMINATION 0.1
|
||||
#define GLOBALILLUMINATION 0.4
|
||||
enum objectType {
|
||||
SPHERETYPE,
|
||||
QUADTYPE
|
||||
@@ -29,8 +29,10 @@ RGBA getRayColor(RGBA colorList[], bool isLightList[]) {
|
||||
//rayColor = (RGBA){GLOBALILLUMINATION * colorList[0].r,GLOBALILLUMINATION * colorList[0].g,GLOBALILLUMINATION * colorList[0].b,1};
|
||||
//rayColor = (RGBA){0,0,0,1};
|
||||
//return rayColor;
|
||||
isLightList[lightBounces - 1] = 1;
|
||||
colorList[lightBounces - 1] = (RGBA){1,1,1,1};
|
||||
firstLightHitIndex = lightBounces - 1;
|
||||
isLightList[firstLightHitIndex] = 1;
|
||||
colorList[firstLightHitIndex] = (RGBA){GLOBALILLUMINATION,GLOBALILLUMINATION,GLOBALILLUMINATION,1};
|
||||
//colorList[firstLightHitIndex] = (RGBA){0,0,0,1};
|
||||
}
|
||||
//pixel.r += spheresHitList[firstLightHitIndex]->color.r;
|
||||
//pixel.g += spheresHitList[firstLightHitIndex]->color.g;
|
||||
|
||||
Reference in New Issue
Block a user