Added mip selection using ray differentials
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include "Geometry/Triangle.h"
|
||||
#include "cglm/struct/vec3.h"
|
||||
|
||||
ray_t ray_create(vec3s origin, vec3s direction)
|
||||
ray_t ray_create(vec3s origin, vec3s direction, float cone_width, float spread_angle)
|
||||
{
|
||||
ray_t ray =
|
||||
{
|
||||
@@ -13,7 +13,9 @@ ray_t ray_create(vec3s origin, vec3s direction)
|
||||
.sign =
|
||||
((direction.x < 0.0f) ? 1 : 0) |
|
||||
((direction.y < 0.0f) ? 2 : 0) |
|
||||
((direction.z < 0.0f) ? 4 : 0)
|
||||
((direction.z < 0.0f) ? 4 : 0),
|
||||
.width = cone_width,
|
||||
.spread_angle = spread_angle
|
||||
};
|
||||
|
||||
ray.esp = glms_vec3_max(glms_vec3_abs(ray.origin)) * gamma(15);
|
||||
|
||||
Reference in New Issue
Block a user