Texture Blending
5 nodes
On this page 5
Arithmetic
FunctionArithmetic between two textures, pixel by pixel.
Signature
Arithmetic -> Texture
a: Texture
b: Texture
operation: Texture OperationTexture Arithmetic(
Texture a,
Texture b,
TextureOperation operation = TextureOperation.Add)Parameters
| name | type | default | description |
|---|---|---|---|
| a | Texture | — | The first operand. |
| b | Texture | — | The second operand. |
| operation | Texture Operation | Add | What to compute. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Blending
- Package
- Image Processing
Arithmetic With Value
FunctionArithmetic between a texture and a number, pixel by pixel.
Signature
ArithmeticWithValue -> Texture
texture: Texture
value: Number
operation: Texture OperationTexture ArithmeticWithValue(
Texture texture,
double value = 0.5,
TextureOperation operation = TextureOperation.Multiply)Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The first operand. |
| value | Number | 0.5 | The second operand. |
| operation | Texture Operation | Multiply | What to compute. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Blending
- Package
- Image Processing
Blend
FunctionLays the foreground over the background by a blend mode, as much as the opacity says and only where the mask is white. With no mask, everywhere.
Signature
Blend -> Texture
foreground: Texture
background: Texture
mode: Blend Mode
opacity: Number
mask: TextureTexture Blend(
Texture foreground,
Texture background,
BlendMode mode = BlendMode.Normal,
double opacity = 1,
Texture mask)Parameters
| name | type | default | description |
|---|---|---|---|
| foreground | Texture | — | What is laid on top. |
| background | Texture | — | What it is laid on; the result takes its size. |
| mode | Blend Mode | Normal | How the two combine. |
| opacity | Number | 1 | How much of the blend shows, 0 to 1. |
| mask | Texture | — | Where it shows: white fully, black not at all. Optional. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Blending
- Package
- Image Processing
Height Blend
FunctionThe higher of two heights at each pixel, with a soft seam: how stones sit in mortar, how two layers of rock meet. Also answers which one won, as a mask that is white where the second is on top.
Signature
HeightBlend -> (result: Texture, mask: Texture)
heightA: Texture
heightB: Texture
offset: Number
contrast: NumberTexture HeightBlend(
Texture heightA,
Texture heightB,
out Texture mask,
double offset = 0,
double contrast = 0.9)Parameters
| name | type | default | description |
|---|---|---|---|
| heightA | Texture | — | The first height. |
| heightB | Texture | — | The second height. |
| offset | Number | 0 | Raises the second height before comparing, -1 to 1. |
| contrast | Number | 0.9 | How sharp the seam is, 0 (a broad mix) to 1 (a hard edge). |
Returns
| result | Texture |
| mask | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Blending
- Package
- Image Processing
Lerp
FunctionMixes from the first texture to the second by the mask: black takes the first, white the second.
Signature
Lerp(first: Texture, second: Texture, mask: Texture) -> Texture
Texture Lerp(Texture first, Texture second, Texture mask)
Parameters
| name | type | default | description |
|---|---|---|---|
| first | Texture | — | Where the mask is black. |
| second | Texture | — | Where the mask is white. |
| mask | Texture | — | The mix at each pixel. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Blending
- Package
- Image Processing