goofi v3.0.0

Constant

one colour everywhere

The simplest source there is: every texel takes the four channels below.

Constant wgsl
out
Type name
graphics:Constant
Plane
graphics
Tags
imagegenerator
Language
wgsl
Tier
shader
Bundle
graphics
Source
node-bundles/graphics/Constant.wgsl
Availability
available

Slots

SlotDirectionType
outoutputTEXTURE

Parameters

colour

NameTypeDefaultRangeDoc
rfloat10 … 1
gfloat10 … 1
bfloat10 … 1
afloat10 … 1

common

NameTypeDefaultRangeDoc
widthint00 … 8192Texture size in pixels; 0 follows the first wired texture input. A node that makes its own frames follows the patch's default instead.
heightint00 … 8192Texture size in pixels; 0 follows the first wired texture input. A node that makes its own frames follows the patch's default instead.

Source

The current source of this node, as it stands in the goofi repository at node-bundles/graphics/Constant.wgsl.

node-bundles/graphics/Constant.wgsl
/* goofi
{ "doc": "one colour everywhere\nThe simplest source there is: every texel takes the four channels below.",
  "tags": ["image", "generator"],
  "params": [
    {"group": "colour", "name": "r", "kind": "float", "default": 1.0, "min": 0.0, "max": 1.0},
    {"group": "colour", "name": "g", "kind": "float", "default": 1.0, "min": 0.0, "max": 1.0},
    {"group": "colour", "name": "b", "kind": "float", "default": 1.0, "min": 0.0, "max": 1.0},
    {"group": "colour", "name": "a", "kind": "float", "default": 1.0, "min": 0.0, "max": 1.0} ] }
*/
fn shade(uv: vec2f) -> vec4f {
    return vec4f(p.r, p.g, p.b, p.a);
}

← All nodes