Gradient Shader for Unity3D
In Unity3D, it is currently not possible to apply a gradient to an object. This shader allows you to fix this problem. The GradientShader.shader shader is a pixel shader. Custom shader supporting the following:
  • Texture mapping;
  • Color overlay on texture;
  • Gradient overlay (max 8 colors, max 8 transparency values);
  • Several gradient shape calculation modes;
  • Several gradient blending modes;
  • The ability to rotate the gradient in linear mode;
  • The ability to reflect the gradient;
  • The ability to adjust the intensity of the gradient.
Attention!!! Since arrays cannot be placed in the Properties shader block, separate variables were created to store the gradient parameters.
A control script with a custom editor is attached to the shader.
Reference to unity asset store -
Сергей Горшков
GSD94 - Programmer