SkSL Shader
Last updated
Was this helpful?
Last updated
Was this helpful?
The does not currently support SkSL Shaders.
SkSL ("Skia Shading Language") is a variant of GLSL which is used as Skia's internal shading language. With some minor modifications, GLSL code from sites like can be converted for use in Cavalry.
For more detail on the differences between GLSL and SkSL see the .
Note - our SkSL shader currently only takes float uniforms. We will be expanding this functionality soon.
Blend Mode - see .
Shader Code - paste/edit SkSL code here.
Inputs - click the + Add
button to to add a uniform.
Have a play with a selection of example .cv files.
Original source code:
Stars: Solar Wind: Clouds: Simple:
Delete the default n0
uniform. To do this, right click on the attribute and choose Delete Selected Attribute.
Use the +
button to add a Color (half4) uniform.
Paste the code below into the Shader Code box.
Adjust the color values on the uniform.
Rename the existing n0 uniform to Time. To do this, right click on the attribute and choose Rename.
Paste the code below into the Shader Code box.
Scrub the Time uniform.
Rename the existing n0 uniform to Time. To do this, right click on the attribute and choose Rename.
Use the +
button and choose Add Double 2 (float2) to add a new uniform.
Rename the uniform to Resolution.
Paste the code below into the Shader Code box.
Increase the uniform's values.
Rename the existing n0 uniform to Time. To do this, right click on the attribute and choose Rename.
Use the +
button and choose Add Double 2 (float2) to add a new uniform.
Rename the uniform to Resolution.
Paste the code below into the Shader Code box.
Increase the uniform's values.
In the , open the Fill tab.
You should see a blue flame appear on the Rectangle. You can now start to play with connecting Behaviours (Noise, Sound etc) into each of the inputs. Try connecting a to the Time uniform.