Skip to main content

Introducing new learning courses and educational videos from Apress. Start watching

Texture Coordinate Gradients Estimation for Ray Cones

  • Chapter
  • 69k Accesses


Ray cones were presented as a fast, approximate way to calculate a suitable mip level index for a particular texture sample in a ray tracing shader setup. Though the original technique was doing all the mathematics needed to compute the final mip level index, in this chapter we reformulate the problem in a different way that relies on existing hardware-supported instructions. This maintains almost the same visual results and leads to more convenient shader code. It also further simplifies and reduces the number of instructions from the original ray cones implementation, though we do not claim this necessarily leads to better performance.

This is a preview of subscription content, access via your institution.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations


Editor information

Editors and Affiliations

Rights and permissions

Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (, which permits any noncommercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if you modified the licensed material. You do not have permission under this license to share adapted material derived from this chapter or parts of it.

The images or other third party material in this chapter are included in the chapter’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Reprints and Permissions

Copyright information

© 2021 NVIDIA

About this chapter

Cite this chapter

Bahnassi, W. (2021). Texture Coordinate Gradients Estimation for Ray Cones. In: Marrs, A., Shirley, P., Wald, I. (eds) Ray Tracing Gems II. Apress, Berkeley, CA.

Download citation