This is a collected list of the sample code for Metal that Apple has published so far. Links are subject to change, and all content is preliminary.
-
MetalBasic3D: OpenGL ES template ported to Metal (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalBasic3D
-
How to create a basic textured quad. (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalTexturedQuad
-
How to stream vertex data between 3 command buffers using one block of memory shared by both the CPU and GPU. (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalVertexStreaming
-
Using a data buffer to set uniforms for the vertex and fragment shaders. (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalUniformStreaming
-
Demonstrates environment mapping by combining 2D mipmap PVRTC textures, cube map textures and lighting. (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalEnvironmentMapping
-
Demonstrates a deferred lighting algorithm. (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalDeferredLighting
-
How to load a texture into a 2D Quad and perform a simple grayscale conversion compute post processing pass. (published 2014-06-16) developer.apple.com/library/prerelease/ios/samplecode/MetalImageProcessing