$0+

Metal and Shaders Boilerplate App

7 ratings
I want this!

Metal and Shaders Boilerplate App

$0+
7 ratings

Xcode project for an iOS App with a Metal Kit view and a basic vertex and fragment shader

for iOS and macOS

Shader taken from youtube

Very straightforward, just one file is important, Renderer.swift where we set the vertex buffer ( just two triangles, 6 vertices) and the uniforms, just the time and aspect ratio, you can add all variables you want here.

If you want to copy shaders from shadertoy dot com, you can rename the types using typedef, for example:

typedef float2 vec2;

typedef float4 vec4;

typedef float2x2 mat2x2;

etc.

Some functions needs to be renamed too (if you copy from shadertoy) like mod, is fmod .

Ask me if you need more help

_

Added rotation in new version

$
I want this!

Zip file with Xcode Project

Size
49.6 KB
Copy product URL

Ratings

4.4
(7 ratings)
5 stars
86%
4 stars
0%
3 stars
0%
2 stars
0%
1 star
14%