How to access a single component of a color vector as variable?


I am still very new to vvvv and want to modify some shaders.
I need to access single color components of a color vector to use them for non-vector type calculations.

So for a given color “float4 c1” I want to access e.g. the red, blue, green or depth component individually.

I thougt maby there is a notation like c1.0 or c1.r or Is there a way to do this?

float4 c;
c.x , c.y, c.z , c.w
c.r, c.g, c.b, c.a

alos you can mix like
c.rg or and so on

this is called swizzling and documented here:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.