Kodeco Forums

Metal Tutorial with Swift 3 Part 4: Lighting

In this fourth part of our Metal tutorial series, learn how to light 3D objects using the Phong lighting model.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/714-metal-tutorial-with-swift-3-part-4-lighting

Big Thank You for these Metal tutorials :slight_smile:

Note : I’ve noticed the following: if I’m rotating the cube in one direction then circle of specular lighting circle is changing the size (from normal size to bigger size and cycle continues)!

I’m practically total beginner in Metal, so I can’t say much more, but there’re some pictures, if it helps to illustrate the situation:



As the vertices of cube don’t change like Uniforms, why to set them for every frame? can’t we set them just once? may b then we will be a ninja!

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]