How to add a standard lighting model to a SCNProgram
Published in
1 min readNov 19, 2018
Standard lighting models are listed here.
let program = SCNProgram()let programType:String = "YOUR_SHADER_PREFIX"program.fragmentFunctionName = programType+"SurfaceFragment"program.vertexFunctionName = programType+"VertexShader"let shaderMaterial = SCNMaterial();shaderMaterial.program = program;shaderMaterial.lightingModel = .lambert;
Key addition being:
shaderMaterial.lightingModel = .lambert;
O