Structure

SCNShaderModifierEntryPoint

Keys for the shaderModifiers dictionary, each corresponding to an entry point in SceneKit’s shader programs where you can attach a custom GPU shader code snippet.

Declaration

struct SCNShaderModifierEntryPoint

Overview

For details on shader modifiers, see Use Shader Modifiers to Extend SceneKit Shading in the protocol overview.

SceneKit inserts your shader modifiers into its shader program in the order shown here, so you can use the structures defined by earlier entry points in later entry points. For example, a snippet associated with the fragment entry point can read from the _surface structure defined by the surface entry point.

Topics

Type Properties

static let fragment: SCNShaderModifierEntryPoint

Use this entry point to change the color of a fragment after all other shading has been performed.

static let geometry: SCNShaderModifierEntryPoint

Use this entry point to deform a geometry’s surface or alter its vertex attributes.

static let lightingModel: SCNShaderModifierEntryPoint

Use this entry point to provide a custom lighting equation.

static let surface: SCNShaderModifierEntryPoint

Use this entry point to modify the surface properties of a material before lighting is computed.

Relationships

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software