diff options
author | Julian T <julian@jtle.dk> | 2020-03-23 15:56:54 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-03-23 15:56:54 +0100 |
commit | 6ae610fd7f28ba5ba7a8e0233cd6fb0ac5df4a8b (patch) | |
tree | 389c8ca1ea81b0a32a9e6cbd60456e075914eb17 /ray.h | |
parent | 6ca75e5d27980e082d977ffdb9a93589b55961ce (diff) |
Random is generated by user defined function
Diffstat (limited to 'ray.h')
-rw-r--r-- | ray.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -6,6 +6,9 @@ #include "vector.h" #include "scene.h" +// Random COORD_T between 0 and 1 +extern COORD_T ray_rand(void *seed); + typedef struct { // Start is not unique so it's a pointer to save copying time vector_t *start; @@ -17,6 +20,7 @@ COORD_T ray_intersect_sphere(sphere_t *s, ray_t *ray, bool skip_dist); COORD_T ray_intersect_plane(plane_t *p, ray_t *ray, bool skip_dist); object_t *ray_cast(space_t *s, ray_t *r, COORD_T *dist_ret, bool chk, COORD_T chk_dist); -color_t *ray_trace(space_t *s, unsigned int x, unsigned int y, unsigned samples); +color_t *ray_trace(space_t *s, unsigned int x, unsigned int y, unsigned samples, void *seed); + #endif |