A FREE and simple-to-use tool for generating “live” gradient textures, which can be edited in-place, non-destructively, and the result used just like any other typical texture object in Unity. You can assign it in your shaders, read the colours via C#, copy it to a new texture, etc…

You can even also export the result as an actual PNG texture if you’d like, allowing you to integrate Photoshop, or any other image editor toolchain/workflow.

Quick Start

  1. Right Click your Assets folder → Create → Gradient.
  2. Click the Gradient property colour to setup the colours.
  3. Click the Generate/Update Texture button.

See the images below for reference…

“Gradient Tool” is a scriptable object with a perma-linked texture sub-asset.

“Gradient Tool” is a scriptable object with a perma-linked texture sub-asset.

This is the texture you can assign to shaders, sample, etc…

You can reference/assign this texture like any other object.

You can reference/assign this texture like any other object.

Instructions / Tips

Nothing other than the single GradientTool.cs script is necessary for the asset.

Settings

You can use Resolution to determine the width, while the height will always be 1px.

If you set the texture Filter Mode to Bilinear sampling, you’ll get smooth values even with a just handful of pixels (at the cost of largely or often negligible interpolation/accuracy sampling issues).

image.png

You can use the Auto Save toggle for realtime texture updates, but it should be off otherwise.

Colour Lab

Here is where you can make adjustments to the keys of Gradient.