所有现代 API 现在都支持光线追踪。它可在 Windows(D3D12 和 VK)、Linux (VK) 和 macOS (Metal) 上使用。D3D12 和 VK 光线追踪没有区别。Metal API 仅支持光线查询,D3D12 和 VK API 也支持光线查询。主要的光线追踪概念是为几何体创建 BLAS 并将所有几何体组合在单个 TLAS 内。司机对引擎盖下的一切负责。
通过简单的修改,我们的测试应用程序就可以在光线追踪 (RT)、光线查询 (RQ) 和计算着色器 (CS) 渲染模式下工作。我们将渲染 490K 三角形的 81 个相同实例。但这一次,根本不会进行光栅化。每个像素将始终追踪主光线、阴影光线和反射光线。
简单的计算着色器光线查询模式将使用我们的通用 GPU BVH 构建器,每个叶子分区有一个三角形。每个BVH节点消耗12字节。整个模型需要 45 MB BVH 缓冲区。对于光栅化,该模型需要 13 MB 用于 32 字节顶点和 32 位索引缓冲区。
我们先看一下1600×900分辨率的结果:
实时D3D12 | RT VK | RQ D3D12 | RQVK | 需求量MTL | 质量控制系统 | BLAS尺寸 | BLAS构建 | |
---|---|---|---|---|---|---|---|---|
英伟达精视3080 | 0.58毫秒 | 0.54 毫秒 | 0.60毫秒 | 0.55毫秒 | 4.92 毫秒 | 33 MB (15 MB) | 7 毫秒(18 毫秒) | |
GeForce 2080 钛 | 1.06 毫秒 | 1.03毫秒 | 0.95毫秒 | 0.97 毫秒 | 7.35 毫秒 | 33 MB (15 MB) | 7 毫秒(18 毫秒) | |
英伟达精视1060M | 34.59 毫秒 | 33.81 毫秒 | 43 MB (37 MB) | 7 毫秒(18 毫秒) | ||||
Radeon 6700 XT | 2.50 毫秒 | 2.55 毫秒 | 1.71 毫秒 | 2.06 毫秒 | 6.13 毫秒 | 76 MB (65 MB) | 15 毫秒(> 500 毫秒) | |
Radeon Vega 56 (macOS) | 15.84 毫秒 | 15.48 毫秒 | 82MB | 30毫秒 | ||||
苹果 M1 (macOS) | 48.8 毫秒 | 46.4 毫秒 | 82MB | 100毫秒 | ||||
苹果 A14(iOS) | 98.0 毫秒 | 94.3 毫秒 | 82MB | |||||
肾上腺素 660(安卓) | 431 毫秒 |
- Nvidia RTX 系列 GPU 具有最佳性能,Ray 查询速度稍快。最棒的是,压缩后的 BLAS 大小仅为 15 MB,这比光栅化的模型表示大几 MB。计算着色器光线追踪比硬件加速慢 7.7 倍。
- AMD 光线查询 (D3D12) 和光线追踪 (VK) 之间存在 50% 的差异。看起来该驱动程序仅针对 D3D12 光线查询进行了优化。硬件光线追踪比计算着色器实现快 3.5 倍。但主要问题是 BLAS 的大小比其所能容纳的大四倍多。此外,即使启用了快速构建标志,第一代 BLAS 的速度也慢得令人痛苦。
- 有趣的事实:计算着色器光线追踪在 AMD 上比在 Nvidia 上更快。
- Metal 上没有硬件光线追踪。当前的实现比简单的计算着色器慢。BLAS 还需要两倍的内存量。有些三角形不相交,因此模型在所有硬件上渲染期间都有孔。
- 被动冷却的 Apple M1 仅比 GeForce 1060M GPU 慢 33%。
- 顶点缓存优化也提高了光线追踪性能。
现在,原生 4K 怎么样?
实时D3D12 | RT VK | RQ D3D12 | RQVK | 质量控制系统 | |
---|---|---|---|---|---|
英伟达精视3080 | 3.16 毫秒 | 3.13 毫秒 | 3.25毫秒 | 3.13 毫秒 | 21.00 毫秒 |
GeForce 2080 钛 | 4.78 毫秒 | 4.77 毫秒 | 4.92 毫秒 | 4.86 毫秒 | 32.21 毫秒 |
Radeon 6700 XT | 12.89 毫秒 | 13.35 毫秒 | 8.48 毫秒 | 9.77 毫秒 | 27.94 毫秒 |
- AMD 显示光线查询和光线追踪管道之间存在 65% 的差异。AMD 的选择是显而易见的。
- 对于 Nvidia 来说,使用光线追踪比光线查询更好,但差异只有 3%。
- 最好的 Radeon 6700 XT 光线查询性能比 GeForce 2080 Ti 慢 70%。最大差距为280%。
有趣的是,拥有更多光线追踪核心的 AMD 将如何表现。AMD 的主要问题是加速结构的大小及其构建时间。特别是对于具有数千个实例的动态 TLAS。
这是计算着色器光线追踪的图像和热图图像。红色通道表示按 128 缩放的 BLAS BVH 相交步骤数。计算着色器光线追踪的主要瓶颈是 Ray-BVH 相交,由于发散和分散的内存访问,无法很好地优化该相交。相比之下,体积-BVH 交集在计算着色器上表现出色。但不幸的是,我们无法将硬件(API)光线追踪加速结构重复用于不同的目的。
更多信息请访问https://www.51garena.com
I read this piece of writing completely on the topic of the difference of latest and previous technologies, it’s amazing article.
Incredible! This blog looks exactly like my old one! It’s
on a totally different subject but it has pretty much the same page layout and design. Wonderful choice of colors!
You could definitely see your expertise in the work
you write. The sector hopes for even more passionate writers like you who are not afraid to mention how they
believe. At all times go after your heart.
Right away I am ready to do my breakfast, later
than having my breakfast coming again to read other news.
Thanks very nice blog!
I’m really impressed with your writing skills as well as with the layout on your blog.
Is this a paid theme or did you modify it yourself?
Anyway keep up the excellent quality writing, it is
rare to see a great blog like this one nowadays.
I think this is one of the most significant info for me.
And i am glad reading your article. But want to
remark on some general things, The site style is
perfect, the articles is really great : D. Good job, cheers
This is a topic that is near to my heart…
Cheers! Exactly where are your contact details though?
We are a bunch of volunteers and opening a brand new scheme in our community.
Your site provided us with valuable info to work on. You have
performed a formidable process and our whole group will likely be grateful to you.
Heya this is kind of of off topic but I was wanting to know if
blogs use WYSIWYG editors or if you have to manually code with HTML.
I’m starting a blog soon but have no coding knowledge so I wanted to
get advice from someone with experience. Any help would
be enormously appreciated!
Just desire to say your article is as astounding. The clearness on your submit is simply spectacular
and i can suppose you’re an expert in this subject. Well together
with your permission let me to snatch your feed to keep updated with forthcoming post.
Thank you 1,000,000 and please continue the enjoyable work.
Hello, I enjoy reading all of your article.
I like to write a little comment to support you.
Wow, superb blog format! How long have you been blogging for?
you make blogging look easy. The entire look of your web site is
fantastic, as well as the content material!
Amazing! This blog looks exactly like my old one! It’s on a
completely different topic but it has pretty much the same layout
and design. Outstanding choice of colors!
I’m really loving the theme/design of your web site.
Do you ever run into any browser compatibility issues?
A small number of my blog audience have complained about
my site not operating correctly in Explorer but looks great in Chrome.
Do you have any tips to help fix this issue?
Great post.
Can I simply just say what a relief to find somebody who really
knows what they are discussing on the web.
You actually understand how to bring a problem to light and make it important.
A lot more people must check this out and understand this side of the
story. It’s surprising you are not more popular given that you certainly have the gift.
First off I want to say awesome blog! I had a quick question in which I’d like to ask if you do not mind.
I was interested to know how you center yourself and clear
your thoughts before writing. I’ve had difficulty clearing my mind in getting my ideas out.
I do take pleasure in writing however it just seems like the first 10 to 15
minutes are generally wasted simply just trying to figure out how to begin.
Any recommendations or hints? Thanks!
Outstanding story there. What happened after? Thanks!
Hi there! This article could not be written any better!
Going through this post reminds me of my previous roommate!
He always kept preaching about this. I’ll forward this
article to him. Fairly certain he’ll have a great read.
I appreciate you for sharing!
Great post. I was checking continuously this blog and I’m impressed!
Extremely useful info specially the last part :
) I care for such info much. I was looking for this
particular info for a very long time. Thank you and good
luck.