Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Mac Editor Metal?

Discussion in '5.6 Beta' started by MrEsquire, Dec 15, 2016.

  1. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hey,

    1) Is this included in the first beta build?
    2) What improvements can we see from this as a Mac user, has there been any performance testing to do comparison?

    Thank you
     
  2. darthbator

    darthbator

    Joined:
    Jan 21, 2012
    Posts:
    155
    Projects that previously ran on my laptop at 20-30fps now run at 60. I would say it's in there!
     
    MrEsquire and radimoto like this.
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Nice, thanks for the info :)
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    I've been playing with metal compute shaders. Very promising stuff that I've been raving about on the forum for a long time, great to finally see it emerging, cheers to all at Unity who made it happen :)

    Support inside the editor appears to be rather experimental at this stage. Two ways I've discovered to enable it:

    use the -force-metal option when launching Unity.

    Have a project thats set to build to iOS and uses Metal graphics API, and tick the box for metal editor support thats in the iOS section of the player settings.
     
    MrEsquire likes this.
  5. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    438
    hello,
    here is how to start Mac OS X Unity3D with Metal support:

    open terminal and type:
    and Unity opens with Metal support... look in the Titelbar of Unity3D <Metal>

    M.
     
    anovix likes this.
  6. dreamerflyer

    dreamerflyer

    Joined:
    Jun 11, 2011
    Posts:
    927
    hi~ any example for ios metal compute shader? and tessellation shader?
     
  7. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    Tessellation shaders arent my thing so I can't comment on those. I would like to share a compute shader at some point in the coming weeks but dont have anything working reliably on iOS quite yet, mostly due to a lack of time on my part. If I make great progress this weekend I will share but it will probably be longer than that.
     
    dreamerflyer likes this.
  8. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    666
    So tessellation and displacement maps will be possible on Mac and iOS soon?
     
  9. dreamerflyer

    dreamerflyer

    Joined:
    Jun 11, 2011
    Posts:
    927
    where is it?
     
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    I was having metal editor stability problems with El Capitan, more so with 5.6 beta 2 and 3 than I had with beta 1, so I tried Sierra yesterday. It seems a lot more stable with more consistent compute results in Unity. But it could be something specific to my setup as I've been using a GTX 970 with Nvidia web drivers and the driver version is different for Sierra compared to El Capitan.

    I only gave it a quick try but it seems like the Adam interior demo asset package, which shows off the area lights and fog and is labelled as 'DX11 only' will at least partially work (the fog works!) on macOS metal now!
     
  11. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Is there a website or program to use to test performance on Webdrivers and OS drivers, comparison?
    Then do the same for Unity with metal enabled?
     
  12. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    666
  13. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hey, thank for the link, did some comparison on laptop and found that Nvidea Webdrivers are fare worse performance then the Apple drivers, so will avoid these. So now just wish comparison between Unity Metal enabled and disabled.
     
  14. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    666
    How did you get Sierra running with your NVIDIA-Chip without the web driver? Every time I boot into Sierra w/o the web drivers the system running the card as an old school GFX with 4MB or so x_x
     
  15. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    I suspect thats because nvidia chips that shipped in mac laptops have support built into the OS, you dont have to use the nvidia webdriver for those. It's only cards that have been added to Mac Pro's later, cards that never officially shipped in a machine configuration supplied by Apple, that need the driver.
     
    MrEsquire likes this.
  16. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    Ah I'm having so much fun with this - I've always sung the praises of Unity for planning to make compute shaders work well beyond their HLSL DX11 origins and now its arrived for metal they have not disappointed - excellent work!

    So far I got Fluidity (from the asset store) working with just some minimal changes to non-compute shaders (change pragma target 5.0 to 4.5). And a similar fluid simulation that scrawk posted to his now sadly defunct blog some years ago. And my modified version of his work that uses 3d textures instead of compute buffers. And the worlds most basic compute-shader based particle system which I wrote myself. And a version of the particles that uses the fluid sim to control their velocity. And a version that renders meshes instead of points using DrawMeshInstancedIndirect (based on example code in the 5.6b manual). Great stuff!

    The editor is very stable for me in metal mode now I've upgraded to Sierra, although so far two things seem fairly consistently broken for me in the editor in this mode - the color picker is broken and only shows grey, and various things (eg materials, lights, ambient light settings) that make use of it seem to default to using a rather red colour. And I have no text cursor when I click on, for example, inspector value boxes to change them. Thats with the latest Sierra & Nvidia Webdriver with a GTX 970 as per my previous posts.
     
    Muckel likes this.
  17. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    438
    yes finally :)
    if that would not happen... we all around 30% would go away from Unity...
    2017 show if Unity take it's words or if it all was marketing...
    some teams changed to the Unreal Engine because of the good iOS support... things working way faster there... still...
    hope Unity will finally do what they say in 2017 and not listen too much only to the Windows DX11 and VR kid's that are crying loud and make trouble...
    M. :Tiphat:
     
    Griffo likes this.
  18. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    708
    In fairness to Unity the lack of modern 3D support on macOS is due to Apple solely. Now that they have gone down the Metal road we might slowly see a DX11 equivalent on macOS. Signs are looking promising.

    BTW thanks for the terminal cmd to force Metal in the Editor.

    Finally @elbows love to see some of your metal shaders, especially converted scrawk (RIP) D11 stuff.

    Cheers.
     
    Last edited: Jan 11, 2017
unityunity