> For the complete documentation index, see [llms.txt](https://docs.lightact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lightact.com/layers-and-layouts/stock-layer-templates/generative-layer-templates/channel-mixer.md).

# Channel mixer

<figure><img src="/files/bgyme1XpPM1wiiCqEEKW" alt=""><figcaption></figcaption></figure>

**Channel mixer** is a layer template that takes 2 textures and mixes their channels in an arbitrary way to create its output texture.

In the image above what's happening is this:

1. Color grid is rendered to the video screen first. That's just for visualisation of the alpha.
2. The 2 gradients are feeding their outputs into the Channel mixer layer
3. Channel mixer layer is mixing (rerouting) their channels to create the texture that is rendered on top of the Color grid.

{% hint style="warning" %}
Please make sure that all the generative layers that are feeding the *Channel mixer* layer have their *Resolution mode* set to *Custom*.
{% endhint %}

## Variables

### **Render**

Explained in [Stock Layer Templates](/layers-and-layouts/stock-layer-templates.md).

### **Texture channel mixer**

<div align="left"><figure><img src="/files/6OCTkzztPoKyeivjaEtY" alt=""><figcaption></figcaption></figure></div>

* **Input 1**: the first of the two input textures. It needs to come from another layer using [Layer connections](/layers-and-layouts/layer-connections.md).
* **Input 2**: the second of the two input textures. It needs to come from another layer using [Layer connections](/layers-and-layouts/layer-connections.md).
* **R source**: using the dropdown specify which channel of the 2 input textures will be used for the R channel of the output texture.
* **G source**: using the dropdown specify which channel of the 2 input textures will be used for the G channel of the output texture.
* **B source**: using the dropdown specify which channel of the 2 input textures will be used for the B channel of the output texture.
* **A source**: using the dropdown specify which channel of the 2 input textures will be used for the A channel of the output texture.

{% hint style="info" %}
**Good to know:** if you are using a black & white texture without alpha as the alpha matte (where white means completely transparent and black completely opaque), then you need to set the A source as either R, G or B (but not A) of that texture.
{% endhint %}
