Use the render options and advanced render options in premade materials to set how the material renders in your Spark AR effect.
Render options and advanced render options can be edited in the Inspector, when a material is selected in the Assets panel.
Back - Discard pieces of the mesh that are facing away from the viewer. Most effects use this mode to improve performance.
Front - Discard pieces of the mesh that are facing the viewer.
Sets the blend mode of the material.
Sets the transparency of the material on an individual map level.
Multiplies a color or texture against a grey-scale version of the video feed. Only availabe in the face paint material.
Sets the brightness of a color. Only availabe in the face paint material.
Displays both sides of a face normal.
Use the slider to make semi-transparent parts of a material transparent.
Use Depth Test and Write to Depth Buffer
Use the Write to Depth Buffer and Use Depth Test boxes to control certain order parameters for the object the material is applied to.
Both boxes selected
Enable read and write depth buffer. This means that closer objects will obscure far objects.
Write to Depth Buffer box selected
Disable read depth and enable write depth. These objects will always draw over any other object. They will obscure father objects that are drawn after unless these objects have either the Write to Depth Buffer or both boxes selected.
Use Depth Test selected
Enable read depth and disable write depth. These objects will be obscured by nearer objects that have already been drawn that have either the Write to Depth Buffer or both boxes selected.
These objects can be obscured by any objects drawn afterwards, whether they’re nearer or further away.
Clear both boxes
Disable read and write depth. These draw on top of any objects of any type already drawn, and in turn will be overdrawn by any later rendered objects, regardless of whether they are nearer or further away.
Use these boxes to disable writing to specific channels of the color buffer. The color channels of the cleared editors will be preserved after rendering.
When using this feature, the color in the Simulator and the viewport might not be the same. The Simulator will most closely match the end result on a device.