Like other patches in Spark AR Studio, there are several different types of visual shader patch. You can connect these patches to determine the appearance of an object.
Find out more about using visual shaders.
Consumer patches represent a material's properties. Connecting other patches to the consumer patch will have the same effect as setting its properties in the Inspector Panel.
These patches represent textures you've added to your project.
They have 3 output ports:
You can instantiate the same asset patch more than once.
This patch creates a gradient. It has one output port, which is a 1-channel grayscale texture of a gradient.
You can change the gradient shape to either horizontal, vertical or circular.
This patch creates a 4-channel texture color gradient. The shape of the gradient will depend on whether the input of the Gradient patch it's connected to is circular, vertical or horizontal.
The Gradient Step patch has 5 input ports:
It has 2 output ports:
Learn more about using the **Gradient Step** patch in our example graphs.
This patch allows you to sample a texture at particular coordinates.
It has 2 input ports:
It has 1 output port, Color. The output will the value sampled from the texture. It will be `Scalar` for 1 channel textures or `Vector2`, `Vector3` or `Vector4` for 2, 3, or 4-channel textures.
This patch allows you to transform a texture, for example scale or rotate it, when used with a 2D Transform Pack patch.
The Texture Transform patch has 2 input ports:
It has 1 output port:
Learn more about using the Texture Transform patch with a 2D Transform Pack patch in our example graphs.