beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
Ops.Gl.Texture2ColorArray

Texture2ColorArray
op id:51dbc04e-f970-44ca-9cb0-39596ac4d212
extract colors from a texture

summary (oneliner)

This op needs to be a child of an Image compose op. It is advised to turn off use Viewport size with the image compose and to make a smaller texture with user defined values.

Enable HDR on the image compose to get floating point outputs from the arrays.
Otherwise the array out will have values of 0-255 instead of 0.0 to 1.0

Be careful with using high resolutions. Setting image compose to 100 x 100 will already result in an array length of 40,000
Red 10,000
Green 10,000
Blue 10,000
Alpha 10,000

The array out will have the format of RGBA.
To extract one color part of the array use the ArrayUnpack4 op.

doc

issues

youtube id

collections

related ops

Inputs

update (Function)

Trigger the op


texture (Object)

texture in to turn into an array. Beware of high resolutions.


Outputs

trigger (Function)

Trigger out


Colors (Array)

Outputs the RGBA arrays as one large array


Floating Point (Number)

If HDR is enable on Image compose this will be true else false


field / array unpack4 example:


video tutorial:

Credits

Caught a mistake or want to contribute to the documentation?


Edit this documentcancel save

Examples using Texture2ColorArray

Public Patches using Texture2ColorArray