mirror of
https://github.com/hydra-synth/hydra.git
synced 2025-12-12 09:50:03 +01:00
68 lines
1.2 KiB
Markdown
68 lines
1.2 KiB
Markdown
## Operators
|
|
|
|
Functions for performing operations on sources.
|
|
|
|
- [add](#add)
|
|
- [blend](#blend)
|
|
- [diff](#diff)
|
|
- [layer](#layer)
|
|
- [mult](#mult)
|
|
|
|
### add
|
|
|
|
`.add( texture, amount )`
|
|
|
|
* `texture`
|
|
* `color` :: see [color `vec4`](#color-vec4)
|
|
* `src` :: see [`src`](#src)
|
|
* `shape` :: see [`shape`](#shape)
|
|
* `amount` :: float (default `0.5`)
|
|
|
|
Add textures.
|
|
|
|
### blend
|
|
|
|
`.blend( texture, amount )`
|
|
|
|
* `texture`
|
|
* `color` :: see [color `vec4`](#color-vec4)
|
|
* `src` :: see [`src`](#src)
|
|
* `shape` :: see [`shape`](#shape)
|
|
* `amount` :: float (default `0.5`)
|
|
|
|
Blend textures.
|
|
|
|
### diff
|
|
|
|
`.diff( texture )`
|
|
|
|
* `texture`
|
|
* `color` :: see [color `vec4`](#color-vec4)
|
|
* `src` :: see [`src`](#src)
|
|
* `shape` :: see [`shape`](#shape)
|
|
|
|
Return difference of textures.
|
|
|
|
### layer
|
|
|
|
`.layer( texture )`
|
|
|
|
* `texture`
|
|
* `color` :: see [color `vec4`](#color-vec4)
|
|
* `src` :: see [`src`](#src)
|
|
* `shape` :: see [`shape`](#shape)
|
|
|
|
Overlay texture based on alpha value.
|
|
|
|
### mult
|
|
|
|
`.mult( texture, amount )`
|
|
|
|
* `texture`
|
|
* `color` :: see [color `vec4`](#color-vec4)
|
|
* `src` :: see [`src`](#src)
|
|
* `shape` :: see [`shape`](#shape)
|
|
* `amount` :: float (default `1.0`)
|
|
|
|
Multiply images and blend with the texture by `amount`.
|