clay 0.1.2

Fast, modular and extendable ray tracer powered by OpenCL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <clay_core/material/material.h>


MATERIAL_BOUNCE_RET reflective_bounce(
    MATERIAL_BOUNCE_ARGS_DEF
) {
    if (directed) {
        return false;
    }
    new_ray->start = pos;
    new_ray->dir = ray.dir - 2.0f*norm*dot(norm, ray.dir);
    new_ray->color = ray.color;
    return true;
}