Files
hydra/docs/funcs_operators.md
2019-03-20 11:24:49 +00:00

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`.