Function tinyraytracer::jitter_along_normal [−][src]
pub(crate) fn jitter_along_normal(
pt: Vec3,
direction: Vec3,
normal: Vec3,
jitter: f32
) -> Vec3
This function jitters a point along a noraml vector. Why do we need that? @ssloy explains: “Why is that? It’s just that our point lies on the surface of the object, and (except for the question of numerical errors) any ray from this point will intersect the object itself.”