Numerical accuracy

As there are two ray-tracing engines in REDsdk, one which is hardware accelerated and the other which is purely running on the CPU, we have different tolerancies and behaviors, for each engine.

Software ray tracing accuracy

All calculations performed by the CPU are double precision in REDsdk. However, REDsdk keeps the numerical accuracy of the input data submitted to it: if a RED::IMeshShape has a vertex array set using RED::MFT_FLOAT vertices, then the accuracy of the input data is simple precision. REDsdk will do double precision maths using these simple precision vertices.

As matrix transforms are natively double precision, the whole calculation chain down to the vertex level is double precision. Then, vertices can either be set as simple or double precision, up to the application's needs. Generally speaking, double precision data at the geometry level is rarely required while double precision matrices are a must have.

Hardware ray tracing accuracy

Unlike the CPU ray-tracing engine, the hardware accelerated ray-tracing engine uses the GPU to speed up its calculations. Consequently, part of the calculation pipeline uses simple precision floating point values. Therefore native double precision data may loose some accuracy if rendered using the hardware accelerated ray-tracer.