# Texture blending

The following sections contain examples on how to blend textures using shading networks. It is recommended to read Shading network concepts before proceeding.

# Texture blending using InterpolateNode

This script sets up two texture nodes that are blended using the InterpolateNode.

string $pipelineFilePath = "D:\\Pipelines\\ReductionPipelineWithBaking.json";
...

select -all;
SimplygonShadingNetwork
-cn materialName VertexColorNode DiffuseColor1
-cn materialName VertexColorNode DiffuseColor2
-cn materialName VertexColorNode DiffuseColor3

-svn materialName DiffuseColor1 redColorSet     // link red set
-svn materialName DiffuseColor2 greenColorSet   // link green set
-svn materialName DiffuseColor3 blendColorSet   // link blend set

-cn materialName InterpolateNode VertexColorInterpolator

-si materialName VertexColorInterpolator 0 DiffuseColor1   // red set -> 0
-si materialName VertexColorInterpolator 1 DiffuseColor2   // green set -> 1
-si materialName VertexColorInterpolator 2 DiffuseColor3   // blend set -> 2

-sce materialName Diffuse VertexColorInterpolator

-exf materialName Diffuse "D:\\diffuse.xml";

Simplygon
-sf $pipelineFilePath
-asm materialName
-ixf materialName Diffuse "D:\\diffuse.xml";