Any API or package for merging textures at runtime?

Hi everyone,
I’m using Daz3D/uDTU HDRP.SSS for my character’s head material in Unity. The issue is that it only supports one makeup texture for the Base Color Map.

I want to allow users to choose between multiple makeup styles and combine them dynamically onto the base texture.

Are there any Unity APIs or asset store packages that can merge textures at runtime? Or do I have to write a shader/Texture2D blending script?

Any guidance is appreciated! Thanks.

makeup customization in Unity using Daz3D/uDTU HDRP.SSS, so I built a system that lets users dynamically choose and combine different makeup styles at runtime. Here’s how I approached it:

:lipstick: Makeup System Overview

Main Features:

  • Users can pick from multiple makeup categories:
    Foundation, Blush, Eyeshadow, Eyeliner, Lipstick
  • Each makeup item includes:
    Name, Subcategory, BaseMap (color), WeightMap (black & white mask)
  • You can combine multiple makeup items from different categories, and the system will merge them into the head material in real-time.
  • If a user picks a new item from the same category, it replaces the previous one.

:brain: How It Works

  • Base Maps are merged with alpha blending (used by the material as an alpha mask).
  • Weight Maps are merged normally (they’re used differently in the shader and don’t affect alpha).

When merging 2 makeup items, we work with:

  1. Base Map 1
  2. Base Map 2
  3. Weight Map 1
  4. Weight Map 2

These are merged in a script I made called TextureMerger.

:hammer_and_wrench: What TextureMerger Does

  • Takes in Base Maps and Weight Maps from selected makeup items.
  • Blends them pixel by pixel.
  • Outputs a new merged Base Map and merged Weight Map.
  • Applies the final result to the character’s material.

:puzzle_piece: Scripts Breakdown

  • MakeupItem: holds data for one makeup item.
public string name;
public string subcategory;
public Texture2D baseMap;
public Texture2D weightMap;
  • MakeupScreenManager: holds arrays of items for each category.
public MakeupItem[] makeupFoundation;
public MakeupItem[] makeupBlush;
public MakeupItem[] makeupEyeshadow;
public MakeupItem[] makeupEyeliner;
public MakeupItem[] makeupLipstick;
  • MakeupLayouts: manages the UI and controls category/item selection.
  • TextureMerger: handles merging the textures in code.

Extra feature: Users can also clear a specific category’s makeup, and the system will re-merge everything without that item.