Home > Software design >  What does "2..xxx" mean in shaderlab?
What does "2..xxx" mean in shaderlab?

Time:07-03

float3 f = float3(1,2,3);
f *= 2..xxx;

I have no idea what ..xxx does. I got the code from here

CodePudding user response:

It's a "swizzle" operation. In this case of a scalar constant 2.0. 2..xxx is equivalent to float3(2.0, 2.0, 2.0)

You can find more info here in the "Vector swizzle operator" section.

  • Related