Everything you need to know to create an interactive augmented reality experience.
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:
Vector4, representing the starting color of the gradient or 4-channel Texture on which the color gradient is added. This would usually be the output of another Gradient Step.
Vector4, representing the end color of the gradient.
Scalar, representing the start of the range at which the gradient will start.
Scalar, representing the end of the range at which the gradient will end.
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:
Vector2of the coordinates where the texture should be sampled.
It has 1 output port, Color. The output will the value sampled from the texture. It will be
Scalar for 1 channel textures 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:
Matrix3representing the transform to be applied, depending on the input from the 2D Transform Pack patch.
It has 1 output port:
Learn more about using the Texture Transform patch with a 2D Transform Pack patch in our example graphs.
Find inspiration, see examples, get support, and share your work with a network of creators.Join Community