Search Unity

WWDC上展示使用Unity制作的Metal Tessellation Demo

, 六月 17, 2016

在刚刚结束的WWDC 2016大会的“Metal新功能”环节中,Apple工程师展示了由Unity工程师使用Metal技术制作的自适应曲面细分(Tessellation)的Demo。演示了一个低面数球体表面随着我们通过位移贴图改变材质的过程中被不断细分为更多的三角形面片,展示了各种材质的炫酷细节。

以此Demo为证,我们已经在Unity中添加了对Metal Tessellation和Metal Compute技术以及原生Metal着色器语言的支持。我们迫不及待地希望尽快将这些支持移植到Unity正式版中。

 

Metal Tessellation的出现让Unity可以启用预先为Metal准备的曲面细分着色器,同时为曲面细分因子的生成与绘制调用之间的解耦合提供了全新的可能。你可以选择预先生成曲面细分因子,或者编写自定义的Compute Shader在每次绘制时或者作为独立的Pass高效生成。无论以何种方式生成曲面细分因子,每次绘制的渲染管线都保持不变,只有一个顶点着色器和一个片段着色器,再加上曲面细分器发射的新生成贴片。

在展示的Demo中,我们在Metal原生的Compute Shader的每次绘制中编写了自定义的“内核补丁”来计算曲面细分因子缓存。然后循环切换在Unity编辑器中设置的一些材质属性,并用其替换曲面细分器在“后期曲面细分顶点着色器”(同样在Unity中使用原生的Metal着色器编写)中发射的三角形。片段着色器也是Unity中已有的基于物理的标准着色器,但更多的三角形能更真实地展示出材质的细节。

Tessellation(曲面细分)可用于实现细节层次,高效调整以适应不同材质(见Demo),或各种其它特效,只有想不到,没有做不到!Tessellation技术很早就有了,现在终于可以用于iOS平台,并且可以生成非常细节化的网格而不需要从硬盘中事先存储或流式加载大的网格。

这只是Apple宣布的Metal新功能的冰山一角。一些其它的新功能如Metal Resource Heaps和Memoryless Render Targets,对性能及内存使用有了潜在改善,我们也会跟进看看Unity中如何利用这些功能。同时我们也希望大家都能将这么棒的Metal Tessellation用于自己的项目,并就使用过程中的疑问及时向我们反馈!

23 评论

订阅评论

评论被关闭。

  1. Compute Shader for Mac and iOS will be available this year?

    1. Yes, we are working on adding Metal compute to Unity for Mac, iOS, and tvOS.

  2. Charles E. Campbell

    七月 2, 2016 1:45 上午

    Simply Amazing!

  3. what happens to open gl?

    1. Aras Pranckevičius

      六月 19, 2016 9:05 下午

      Nothing changes compared to today. On both iOS & macOS, we support both Metal and OpenGL/ES.

      1. SUPER +64

  4. wait. so can we now use compute shaders on mac finally?
    and ios? with unity? after all these years *____*

    1. Yes, compute *and* tessellation (through Metal) will be available soon on both iOS and Mac. Apple TV hardware does not yet support tessellation however.

  5. Tesselation huh? Can’t remember since when this existant… someone could recall me?

  6. Very interested in Metal Compute!

  7. Who would be interested in a technology that only works on 1 paltform

    C’mon Apple, remove the finger from your ass and add support for Vulkan damn

    1. This is something you should ask AMD/nVidia.
      Who implemented Vulkan on Windows? Certainly not MS!

      1. Oh, I understand that on iOS, only Apple can implement Vulkan. Don’t count on it though.

    2. also Metal works on iOS, tvOS and macOS. DX12 works on Windows 10 and XBox One. Not much more.

      1. Apple should have Vulkan support on their devices. Apple even was a member of Khronos group, being an active member developing Vulkan, then they bailed and made their own API. We COULD finally have ONE api to rule them all (Consoles, Windows/mac, iOS, Android) but no.

  8. wrong link, should be
    https://developer.apple.com/videos/play/wwdc2016/604/
    not wwdc 2015 one.

    1. Thanks Justin. The link should be fixed now.

      1. Tijmen van den Heuvel

        六月 20, 2016 8:59 上午

        Too bad you need Safari or an app to watch the video. Just apple being apple i suppose.

        1. Oooh whooow, can’t believe they still do this kind of stuff. They blame Microsoft being such to force people using there software, but believe me, Apple is worse. Same problem here.

        2. apple is – and this is _IN GENERAL_ only one part of the problem
          the other one is random plankton always immediately mindlessly farting through the keyboard on the internet before actually undergo any effort whatsoever
          like in this case trying to click on ‘Resources’ and discovering there are links for both HD and SD versions of the talk for download

        3. Tijmen van den Heuvel

          六月 21, 2016 9:09 上午

          @ERREXOJ I dont want to download them, i want to stream them like i do with all other video i consume.

        4. if you don’t want to download them in order to WATCH them, then don’t consume – very easy.
          don’t claim you need Safari to do so, though.

  9. i am really interested