diff --git a/desktop.ini b/desktop.ini new file mode 100644 index 0000000..d957fd1 --- /dev/null +++ b/desktop.ini @@ -0,0 +1,4 @@ +[ViewState] +Mode= +Vid= +FolderType=Generic diff --git a/examples.c b/examples.c index 94d67fa..f4b7d9c 100644 --- a/examples.c +++ b/examples.c @@ -22,7 +22,7 @@ void example_color(int width, int height, int channels, unsigned char *image) { } } -void exampleSphere(int height, int width, int channels, unsigned char *image) { +void exampleSphere( int width, int height, int channels, unsigned char *image) { camera cam1; cam1.origin.x = 0; cam1.origin.y = 0; @@ -36,7 +36,7 @@ void exampleSphere(int height, int width, int channels, unsigned char *image) { cam1.width = 1.920; cam1.height = 1.080; vec3 sphereOrigin = (vec3){0,0,5}; - double sphereRadius = 1.0; + double sphereRadius = 2.0; sphere obj = (sphere){sphereOrigin, sphereRadius}; vec3 worldUp = (vec3){0, 1, 0}; diff --git a/main.c b/main.c index bcd69eb..ce5d86d 100644 --- a/main.c +++ b/main.c @@ -13,8 +13,8 @@ #include "collision.h" #include "raytrace.h" int main() { - int width = 1280; - int height = 780; + int width = 1920; + int height = 1080; int channels = 4; unsigned char *image = (unsigned char*)malloc(width * height * channels ); diff --git a/structs.h b/structs.h index 129577d..d5e515a 100644 --- a/structs.h +++ b/structs.h @@ -17,6 +17,7 @@ struct ray { struct sphere { vec3 origin; double radius; + double luminance; }; typedef struct sphere sphere; struct camera { diff --git a/test.png b/test.png index ee59d03..199c8e9 100644 Binary files a/test.png and b/test.png differ