Accuracy consideration for ray-tracing

Accuracy and performance of ray-tracing strongly depend on the elemental subdivision parameter, MESH.

The number of rays launched from an element varies as MESH4, since the rays are launched from each DAi sub-element to each DAj sub-element. The following table shows the number of rays launched from one quadrilateral element to another as a function of the MESH parameter.

MESH Number of rays launched
0 1
1 16
2 256
3 1296
4 4096

It is important to note that the cost of ray-tracing is only proportional to the number of specular/transparent elements in the model, since multiple rays are launched only towards them, and they are the ones that support reflected rays.