Channel Math
Brief Description
Apply a simple GLSL shader expression on each pixels. The expression is evaluated on the GPU. If the Channels Processing Style is set to Vec4, the resulting vec4 "color" variable must be assigned, otherwise the "r", "g", "b", "a" float variables must be assigned, respectively for the red, green, blue and alpha channels. Note that these variables already contain the source pixel intensities, thus if the expression is empty this acts as a pass-through. The auxiliary source is available in the "color1" variable (in vec4 mode) or "r1", "g1", "b1", "a1" in single-channel mode.
User parameters are made available as GLSL uniforms in the expression. The name of the variable is the same as the script-name given to the parameter in its settings.
Note that the Shadertoy modifier provides more features to write more complex shaders: It provides support for more auxiliary sources, support for pre-processor variables and pre-defined variables compatibly with Shadertoy.
Controls
Parameter / Script Name | Type | Default | Function |
---|---|---|---|
Red / process_red | Boolean | On | Enable the red channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
Green / process_green | Boolean | On | Enable the green channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
Blue / process_blue | Boolean | On | Enable the blue channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
Alpha / process_alpha | Boolean | On | Enable the alpha channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
Channels Processing Style / processingStyle | Choice | Separated Channels | |
R / expr_r | r | ||
G / expr_g | g | ||
B / expr_b | b | ||
A / expr_a | a | ||
Auxiliary Source 1 / aux_image_1 | Image | - | |
Uniform Parameters / userParams | - |