Table of Contents

Texture Generation Tools

The Texture Generation Tools are a set of Unity editor utilities for creating procedural textures that can be used in shaders, visual effects, stylized rendering, UI, prototyping, LUT generation, and experimentation. All tools share the same workflow: adjust parameters, preview the result, and export as a PNG.

  • Gradient Texture Generator: Creates 1D or 2D gradient-based textures using Unity gradients, animation curves, color lists, or sine waves. Supports X/Y/Radial/Angular directions, stepped ramps, cyclic gradients, and advanced sampling controls.
  • Pattern Texture Generator: Generates procedural patterns such as checkerboards, white noise, multi-channel noise, HSL maps, color-list noise, and sine-wave grid textures. Useful for prototyping, dithering effects, stylized shading, and effect masks.

Global Output Settings

These controls apply to every texture generation tool.

Controls

Control Range Description
Image Dimensions Integers ≥ 1 Width and height of the generated texture.
Preset Buttons 512×512 / 256×256 / 256×8 Quick selection of common sizes.
Preview Shows a live automatically updated preview.
Save Texture Saves the generated PNG and reimports it into Unity.

Creating Your Own Texture Tool

You can easily add new texture generators to the system by subclassing the shared base class. This provides:

  • Automatic preview generation
  • Automatic PNG export
  • Built-in controls for image dimensions
  • Consistent UI layout
  • A simple override for your texture generation logic

To keep the documentation synchronized with the implementation, this page intentionally does not explain the API details here. Instead, please refer to the TextureGeneratorWindow class documentation for instructions on building your own custom generators.

Best Practices

  • Use power-of-two sizes for broad compatibility (VR, mobile).
  • For LUTs, choose thin textures (e.g., 256×8).
  • Remember to adjust the import settings of the texture for your purpose, especially
    • wrap mode (Clamp vs Repeat)
    • filter mode (Point vs Bilinear vs Trilinear)
    • whether to generate mipmaps
    • compression settings