tsoding / ray-tracer

My ongoing effort to learn how to make Ray Tracers
MIT License
15 stars 2 forks source link

SIMD math #28

Open w23 opened 6 years ago

w23 commented 6 years ago

Which approach will you choose:

  1. 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.
  2. 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?