
Ray Tracing Gems II Next Generation Real-Time Rendering with DXR, Vulkan, and OptiX Edited by Adam Marrs, Peter Shirley, and Ingo Wald Section Editors Per Christensen David Hart Thomas Müller Jacob Munkberg Angelo Pesce Josef Spjut Michael Vance Cem Yuksel Ray Tracing Gems II: Next Generation Real-Time Rendering with DXR, Vulkan, and OptiX Edited by Section Editors Adam Marrs Per Christensen Angelo Pesce Peter Shirley David Hart Josef Spjut Ingo Wald Thomas Müller Michael Vance Jacob Munkberg Cem Yuksel ISBN-13 (pbk): 978-1-4842-7184-1 ISBN-13 (electronic): 978-1-4842-7185-8 https://doi.org/10.1007/978-1-4842-7185-8 Copyright © 2021 by NVIDIA Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the beneft of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identifed as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Open Access This book is licensed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (http://creativecommons. org/licenses/by-nc-nd/4.0/), 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 modifed the licensed material. You do not have permission under this license to share adapted material derived from this book or parts of it. The images or other third party material in this book are included in the book’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book’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. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editors: Susan McDermott, Natalie Pao Development Editor: James Markham Coordinating Editor: Jessica Vakili Cover image designed by NVIDIA Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail [email protected]; for reprint, paperback, or audio rights, please e-mail [email protected]. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book's product page, located at www.apress.com/9781484271841. For more detailed information, please visit www.apress.com/source-code. Printed on acid-free paper Table of Contents Preface ....................................................................................................... xix Foreword.................................................................................................... xxiii Contributors .............................................................................................. xxix Notation...................................................................................................... lv PART I: Ray Tracing Foundations........................................................... 5 Chapter 1: A Breakneck Summary of Photographic Terms (and Their Utility to Ray Tracing) ........................................................................ 9 1.1 Introduction ........................................................................... 9 1.2 Digital Sensor Technology................................................... 10 1.3 Film......................................................................................... 13 1.4 Common Capture Dimensions............................................ 14 1.5 Common Capture Resolutions............................................ 16 1.6 Lensing................................................................................... 16 1.7 Shutter ................................................................................... 19 1.8 Exposure ................................................................................ 21 1.9 Equivalency............................................................................ 24 1.10 Physical Lenses .................................................................. 26 1.11 Bokeh ................................................................................... 27 1.12 Various Lens Imperfections .............................................. 29 1.13 Optical Elements ................................................................ 33 1.14 Anamorphic ......................................................................... 34 1.15 Camera Movement ............................................................. 34 iii TABLE OF CONTENTS Chapter 2: Ray Axis-Aligned Bounding Box Intersection ......................... 37 2.1 The Method............................................................................ 37 Chapter 3: Essential Ray Generation Shaders .......................................... 41 3.1 Introduction ........................................................................... 41 3.2 Camera Rays ......................................................................... 42 3.3 Pinhole Perspective.............................................................. 47 3.4 Thin Lens ............................................................................... 50 3.5 Generalized Panini ............................................................... 52 3.6 Fisheye ................................................................................... 55 3.7 Lenslet ................................................................................... 56 3.8 Octahedral ............................................................................. 58 3.9 Cube Map ............................................................................... 60 3.10 Orthographic ....................................................................... 61 3.11 Fibonacci Sphere ................................................................ 62 Chapter 4: Hacking the Shadow Terminator ............................................. 65 4.1 Introduction ........................................................................... 66 4.2 Related Work......................................................................... 68 4.3 Moving the Intersection Point in Hindsight....................... 70 4.4 Analysis.................................................................................. 72 4.5 Discussion and Limitations ................................................. 74 4.6 Conclusion............................................................................. 75 Chapter 5: Sampling Textures with Missing Derivatives.......................... 77 5.1 Introduction ........................................................................... 77 5.2 Texture Coordinate Derivatives at Visible Points.............. 78 5.3 Further Applications ............................................................ 84 5.4 Comparison ........................................................................... 85 5.5 Conclusion............................................................................. 85 iv TABLE OF CONTENTS Chapter 6: Differential Barycentric Coordinates ...................................... 89 6.1 Background ........................................................................... 89 6.2 Method ................................................................................... 91 6.3 Code........................................................................................ 92 Chapter 7: Texture Coordinate Gradients Estimation for Ray Cones....... 95 7.1 Background ........................................................................... 95 7.2 Ray Cone Gradients.............................................................. 97 7.3 Comparison and Results ..................................................... 99 7.4 Sample Code ......................................................................... 102 7.5 Conclusion............................................................................. 102 Chapter 8: Refection and Refraction Formulas ....................................... 105 8.1 Refection............................................................................... 105 8.2 Refraction .............................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages53 Page
-
File Size-