向C++光线追踪模板库Visionaray添加自定义相交
Adding Custom Intersectors to the C++ Ray Tracing Template Library Visionaray
摘要:
大多数光线追踪库允许用户提供自定义功能,当遇到潜在的光线表面交互时执行该功能,以确定交互是否有效或是否应继续遍历。例如,这对于alpha遮罩验证是有用的,并且允许用户重新使用现有的光线对象相交例程,而不是重新实现它们。使用自定义交叉逻辑增强光线遍历需要某种回调机制,该机制将用户代码注入现有库例程。使用模板库,这种注入可以静态地发生,因为用户自己编译二进制代码。我们提出了一种实现这种“自定义intersector”的方法,并将其集成到C++光线追踪模板库Visionaray。
英文摘要:
Most ray tracing libraries allow the user to provide custom functionality that is executed when a potential ray surface interaction was encountered to determine if the interaction was valid or traversal should be continued. This is e.g. useful for alpha mask validation and allows the user to reuse existing ray object intersection routines rather than reimplementing them. Augmenting ray traversal with custom intersection logic requires some kind of callback mechanism that injects user code into existing library routines. With template libraries, this injection can happen statically since the user compiles the binary code herself. We present an implementation of this "custom intersector" approach and its integration into the C++ ray tracing template library Visionaray.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。