Each SSE register can hold a vec4, making vector adds and muls trivial single instructions, but anything more than that is a puzzle. One ray per execution thread.
Pack four different rays in a single SSE register, each instruction does an operation on all four rays in parallel. Branching will be fun.
Or maybe go for later SSE/AVX extensions and see what they can offer?
Which approach will you choose:
Or maybe go for later SSE/AVX extensions and see what they can offer?