# Half-precision Floating-point Ray Traversal

### Matias Koskela, Timo Viitanen, Pekka Jääskeläinen, Jarmo Takala

#### Abstract

Ray tracing is a memory-intensive application. This paper presents a new ray traversal algorithm for bounding volume hierarchies. The algorithm reduces the required memory bandwidth and energy usage, but requires extra computations. This is achieved with a new kind of utilization of half-precision floating-point numbers, which are used to store axis aligned bounding boxes in a hierarchical manner. In the traversal the ray origin is moved to the edges of the intersected nodes. Additionally, in order to retain high accuracy for the intersection tests the moved ray origin is converted to the child’s hierarchical coordinates, instead of converting the child’s bound coordinates into world coordinates. This means that both storage and the ray intersection tests with axis aligned bounding boxes can be done in half-precision. The algorithm has better results with wider vector instructions. The measurements show that on a Mali-T628 GPU the algorithm increases frame rate by 3% and decreases power consumption by 9% when wide vector instructions are used.

#### References

- Ernst, M. and Greiner, G. (2008). Multi bounding volume hierarchies. In Proceedings of the IEEE Symposium on Interactive Ray Tracing, pages 35-40.
- Ernst, M. and Woop, S. (2011). Ray tracing with sharedplane bounding volume hierarchies. Journal of Graphics, GPU, and Game Tools, 15(3):141-151.
- Hariharakrishnan, K., Barbier, A., and Hedley, F. (2013). OpenCL on Mali FAQs. ARM.
- Huang, J.-H. (2015). Leaps in visual computing. In Opening Keynote of GPU Techonology Conference Available at: http://on-demand.gputechconf. com/gtc/2015/presentation/S5715-Keynote-JenHsun-Huang.pdf (Referenced: 9/18/2015).
- IEEE (2008). Standard for floating-point arithmetic. Std 754-2008.
- Keely, S. (2014). Reduced precision for hardware ray tracing in GPUs. In Proceedings of the High Performance Graphics Conference, pages 29-40.
- Koskela, M., Viitanen, T., Jääskelainen, P., Takala, J., and Cameron, K. (2015). Using half-precision floatingpoint numbers for storing bounding volume hierarchies. In Proceedings of the 32nd Computer Graphics International Conference.
- MacDonald, J. and Booth, K. (1990). Heuristics for ray tracing using space subdivision. The Visual Computer, 6(3):153-166.
- Mahovsky, J. and Wyvill, B. (2006). Memory-conserving bounding volume hierarchies with coherent raytracing. Computer Graphics Forum, 25(2):173-182.
- Smits, B. (1998). Efficiency issues for ray tracing. Journal of Graphics Tools, 3(2):1-14.
- Wächter, C. and Keller, A. (2006). Instant ray tracing: The bounding interval hierarchy. In EuroGraphics Symposium on Rendering Techniques, pages 139-149.
- Wald, I., Benthin, C., and Boulos, S. (2008). Getting rid of packets - efficient SIMD single-ray traversal using multi-branching BVHs. In Proceedings of the IEEE Symposium on Interactive Ray Tracing, pages 49-57.
- Whitted, T. (1979). An improved illumination model for shaded display. ACM SIGGRAPH Computer Graphics, 13:343-349.

#### Paper Citation

#### in Harvard Style

Koskela M., Viitanen T., Jääskeläinen P. and Takala J. (2016). **Half-precision Floating-point Ray Traversal** . In *Proceedings of the 11th Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 1: GRAPP, (VISIGRAPP 2016)* ISBN 978-989-758-175-5, pages 171-178. DOI: 10.5220/0005728001690176

#### in Bibtex Style

@conference{grapp16,

author={Matias Koskela and Timo Viitanen and Pekka Jääskeläinen and Jarmo Takala},

title={Half-precision Floating-point Ray Traversal},

booktitle={Proceedings of the 11th Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 1: GRAPP, (VISIGRAPP 2016)},

year={2016},

pages={171-178},

publisher={SciTePress},

organization={INSTICC},

doi={10.5220/0005728001690176},

isbn={978-989-758-175-5},

}

#### in EndNote Style

TY - CONF

JO - Proceedings of the 11th Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 1: GRAPP, (VISIGRAPP 2016)

TI - Half-precision Floating-point Ray Traversal

SN - 978-989-758-175-5

AU - Koskela M.

AU - Viitanen T.

AU - Jääskeläinen P.

AU - Takala J.

PY - 2016

SP - 171

EP - 178

DO - 10.5220/0005728001690176