2 ms·
Ah, I remember having to figure this out way back in the day when writing a toy ray-tracer. In a raytracer it's a little more obvious what's going on because ty
by taneq 4y ago
Ah, I remember having to figure this out way back in the day when writing a toy ray-tracer. In a raytracer it's a little more obvious what's going on because typically you only write code to intersect with a unit sphere, unit cube etc. and then instead of transforming the primitive itself, you apply the inverse transformation to the ray. So you're already thinking about inverse transformations when you get to calculating the normal.