Is there a way to change Float 2 to float 1 (Alhpa Mask)

Hello everyone!

I have a RGB texture where each color represents different alpha mask. My question is: what is the way to combine R and G using “MakeFloat2” and convert it back to Float1 (Gray scale so I can use it in the mask channel)

In few words I would like to combine two of the masks and use it as an alpha.

Ps. Probably this questions is been asked before but I could not find the answer

Thank you in advance
Stan :slight_smile:

1 Like

You want to “Max” them (maximum) or Multiply them (depending on the use case). MakeFloat2 creates 2D vector where the two individual masks are assigned to X and Y components of the vector. They are not combined.

1 Like

Hello Stan,

The error is telling you that you are passing a float2 (two float s) into an input that only accepts a single float. You are “MakeFloat2” which takes two floats, and combines them into a two float struct.

So you have a lerp between 0 and 1, that makes a values of 0 to 1. You do that twice, it makes two values between 0 and 1. such as two ones = 1 and 1. You “Make float 2” and that combines the two floats into a structure of two floats, aka = (1,1)

You are then passing that (1,1) into your blend which only wants to take a single float, between 0 and 1. not two floats, like that float2 (1,1) you are passing to it.

So do math, something like 1 + 1 = 2. Then you will have a 2 you are passing as a float1 to an input that takes 0 to 1… so you will want to balance that add some how. like x / 2 + x / 2 = alpha mask. But keep the two values you add, within 0-1.

gl hf