Great article!

You can use these two lines to assign the physical based lighting mode instead of recreating and reassigning the material:

cakeNode.geometry?.firstMaterial?.lightingModel = .physicallyBased

plateNode.geometry?.firstMaterial?.lightingModel = .physicallyBased

iOS Developer, speaker and educator. Top Udemy and LinkedIn instructor. Lead instructor at DigitalCrafts. https://www.udemy.com/user/mohammad-azam-2/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store