Documentation / Node reference / code nodes

code/TextureInput

A picture wired into this tex/Builder, as a texture.

Texture

Wire a picture into one of the tex/Builder's inputs and this node gives it as a texture, to read with the nodes that read any texture. code/TextureSample2D with a code/Sampler reads its colour at a uv, blending between pixels. code/TextureTexel reads one pixel exactly, at the pixel being written or next to it. code/TextureSize gives its size in pixels.

A 3D texture wired there (a tex/Volume, or a 3D tex/Builder) comes out as a 3D texture: read it with code/TextureTexel, or with code/TextureSample3D in VALUE mode at a uvw. Only a 3D tex/Builder can read one: in a 2D builder the build is refused with a message naming the input.

The colour comes out in linear light, whatever the picture holds: an 8-bit sRGB picture is decoded before anything blends it. A 32-bit float picture is refused, since a sampler cannot blend it.

Parameters

Name Type What it does
inputIndex UInt8 Which of the tex/Builder's inputs to read, 0 to 3. Something must be wired there.

Examples

Scenes you can open in the editor that teach this node.

A gradient and an ellipse wired into a tex/Builder: inside the ellipse the gradient's colours are inverted, outside they are kept. code/Globals' InputColor reads the gradient pixel for pixel; code/TextureInput gives the ellipse as a texture, which code/TextureSample2D samples.

tex/Builder code/TextureInput code/Globals

Materials

See also

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.