Very interesting
press release! Sounds promising when some developers use Metal and its features to its fullest instead of complaining that no one uses Metal. Any words from
@leman on this?
So there you go, it only took about 8 months to port a DX12 open world game to Mac with all the bells and whistles and they worked together with Apple engineers, meaning if you approach Apple like this or like 4A and Larian Apple is happy to help you. So much for Apple not caring and making it difficult for devs.
"Piranha Bytes always strives to deliver more complex and enhanced games, and bringing ELEX II to Mac was no exception. ELEX II takes advantage of the Metal shading language to tap into Apple silicon performance. With Metal's Indirect Command Buffer (ICB) approach on Mac, the game also fully embraces GPU driven pipelines. In a little over eight months, a team specializing in GPU and Metal ported the DX12 version of ELEX II to Mac. ELEX II worked closely with Metal engineers to take full advantage of the many powerful features and tools to deliver a truly wonderful game."
- GPU driven pipeline with ICB filled at the end of culling process
- There are more than 6+ GPU culling segments (Depth Pre-Pass, Shadows) in the frame with ICB used in every segment
ICB was used with the following parameters
- Inherited pipelines
- Inherited buffers
- Render only (not compute)
- All types of draw + tessellation as well
Shaders
- Slang tool ported to macOS with the source level HLSL->Metal 2.x conversion for:
- Vertex and Fragment shaders
- Geometry shaders
- Tessellation shaders
- On/Off support for argument buffers
- Emulation of DX12 RootSignatures
- Support for most of ‘non-typical’ stuff like atomics, SIMD groups
Metal approaches on macOS
- Utilizing multi-threaded Command Buffer encoding and submission, which means the game can efficiently render the massive open-world in a parallel manner
- The game uses double buffering and not a single ‘wait’, everything is happening without any CPU-GPU synchronization point.
- The game fully embraces Argument buffers for passing textures and samplers inside shaders.
Game Technology used and ported to Metal
- Global Illumination
- Volumetric Fog
- Deferred Clustered Lighting
- Procedural Sky
- GPU driven cloth
- GPU driven particles
- Realistic snow and rain
- Day/night cycles with relit reflection probes
Full compatibility with Metal
Tessellation shaders:
- Conversion of normal HLSL shaders into Metal based approaches
- Massive use of tessellation in effects (fire, water), extremely tessellated objects (alien lifeforms)
- Nothing was compromised, every aspect of tessellation was preserved
DX12 API to Metal:
- Imitation of Root Signatures
- Imitation of Resources allocation/usage/DescriptorTables
- Behind the scenes switching of Render Command Encoder and pipeline states, into a separate library, which Engine just normally uses unaware of Metal API
Game Technologies Ported
- Full controller support with haptic feedback
- On-the-fly keyboard / gamepad switching
- Game ability to choose monitor to render
- Game cooking and packing is fully done on Mac
- ARM and x64 support
- Xcode 13.x used as main build tool
- Xcode 14.x used as main development tool
- GameCenter integration with achievements
- AppStore ready bundle with Sandboxing