unity图文镶嵌_WWDC Unity金属镶嵌演示

unity图文镶嵌

This year, in the “What’s New in Metal” session at WWDC, Apple showed our Unity demo of adaptive tessellation written using Metal. The demo shows a low polygon sphere being tessellated with many more triangles as we shift between materials using displacement mapping, providing beautiful detail of each material.

今年,在 WWDC的“金属新功能”会议上 ,Apple展示了我们使用Metal编写的Unity自适应镶嵌的演示。 该演示展示了一个低多边形球体,当我们使用位移贴图在材质之间进行切换时,其上镶嵌了更多三角形,从而为每种材质提供了精美的细节。

image00

For this proof of concept, we added Metal Tessellation support to Unity, along with Metal Compute and native Metal shading language support. We can’t wait to ship support for these in future versions of Unity.

为证明这一概念,我们向Unity添加了Metal Tessellation支持,以及Metal Compute和本机Metal阴影语言支持。 我们迫不及待要在将来的Unity版本中提供对这些功能的支持。

image02

Metal Tessellation allows Unity to enable pre-existing tessellation shaders for Metal, yet opens up new possibilities by decoupling the generation of tessellation factors from draw calls. You can either pre-generate them or write a custom compute shader to do it efficiently per draw or as a separate pass. Regardless of how you choose to generate tessellation factors, the rendering pipeline for each draw remains the same,with just a vertex and fragment shader, while accounting for newly generated patches emitted by the tessellator.

Metal Tessellation允许Unity为Metal启用预先存在的Tessellation着色器,但通过从绘制调用中分离出生成Teselsellation因子的方式,开辟了新的可能性。 您可以预先生成它们,也可以编写自定义计算着色器以在每次绘制或单独传递时高效地进行处理。 无论您选择如何生成镶嵌细分因子,每个绘图的渲染管线都将保持不变,仅具有顶点和片段着色器,同时考虑到细分生成器发出的新生成的面片。

For the demo, we wrote a custom per draw “patch kernel” in a native Metal compute shader to calculate a tessellation factor buffer. We then cycled through a bunch of material properties set up in the Unity editor and displaced the triangles emitted by the tessellator in the “post tessellation vertex shader” (also written as a native Metal shader in Unity). The fragment shader is the same physically based Unitystandard shader currently existing in Unity, but with more triangles it really brings out the details in the material.

对于该演示,我们在本机Metal计算着色器中编写了一个自定义的“绘制”“补丁内核”,以计算细分因子缓冲区。 然后,我们循环浏览在Unity编辑器中设置的一堆材质属性,并在“后曲面细分顶点着色器”(也称为Unity中的本机Metal着色器)中置换了由镶嵌器发射的三角形。 片段着色器与Unity中当前存在的基于物理的Unitystandard着色器相同,但是带有更多的三角形,它确实带出了材质中的细节。

image01

Tessellation can be used to implement level of detail, efficiently adapt between materials (as in our demo), or for various other effects – limited only by your imagination! While tessellation has been around for a while, we’re excited to see it come to iOS as it can help produce extremely detailed meshes without storing/streaming large meshes on disk.

镶嵌可用于实现细节级别,有效地适应各种材料(如我们的演示中所示)或其他各种效果-仅受您的想象力限制! 尽管镶嵌技术已经存在了一段时间,但我们很高兴看到它出现在iOS上,因为它可以帮助生成极其详细的网格,而无需在磁盘上存储/流式传输大型网格。

This is only one of the many features Apple announced for Metal. Some of the others such as Metal Resource Heaps and Memoryless Render Targets, offer potential for performance and memory usage improvements so we are also excited to see what we can do with them. Meanwhile, we look forward to seeing you use Metal Tessellation in your projects, and welcome your feedback!

这只是Apple为Metal宣布的众多功能之一。 其他一些资源(例如金属资源堆和无内存渲染目标)具有提高性能和内存使用率的潜力,因此我们也很高兴看到我们可以使用它们做什么。 同时,我们期待着您在项目中使用金属镶嵌,并欢迎您提供反馈!

翻译自: https://blogs.unity3d.com/2016/06/17/wwdc-unity-metal-tessellation-demo/

unity图文镶嵌

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值