tangled
alpha
login
or
join now
altagos.dev
/
rayray
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
fixed everything being a little dark
altagos.dev
2 years ago
aa0fd13a
e5efcf6c
+1
-1
1 changed file
expand all
collapse all
unified
split
src
renderer.zig
+1
-1
src/renderer.zig
···
21
22
pub fn rayColor(r: *Ray, world: *hittable.HittableList) zm.Vec {
23
if (world.hit(r, IntervalF32.init(0, std.math.inf(f32)))) |rec| {
24
-
return zm.f32x4s(0.5) * (rec.normal + zm.f32x4(1, 1, 1, 1));
25
}
26
27
const unit_direction = zm.normalize3(r.dir);
···
21
22
pub fn rayColor(r: *Ray, world: *hittable.HittableList) zm.Vec {
23
if (world.hit(r, IntervalF32.init(0, std.math.inf(f32)))) |rec| {
24
+
return zm.f32x4(0.5, 0.5, 0.5, 1.0) * (rec.normal + zm.f32x4(1, 1, 1, 1));
25
}
26
27
const unit_direction = zm.normalize3(r.dir);