ridiculum.bsky.social
ridiculum.bsky.social
@ridiculum.bsky.social
yeah you should explicitly calculate the direction components using a reciprocal (e.g. 1/ray.dir.x) to avoid NaN and also get ±∞ for the 0 case

this technique is mentioned in "An Efficient and Robust Ray–Box Intersection Algorithm": people.csail.mit.edu/amy/papers/b...
people.csail.mit.edu
May 26, 2025 at 12:41 PM
You need to use the newer style string literals with the 's' suffix after the quotes:

en.cppreference.com/w/cpp/string...

So something like:

using namespace std::literals;

"resource size is"s + std::to_string(x)
std::literals::string_literals::operator""s - cppreference.com
en.cppreference.com
March 4, 2025 at 7:39 PM