Playing with types
¡
Vector initialization and swizzling
l
float4 vec4 = float4(1, 1, 1, 0);
l
float3 vec3 = vec4.yzw;
l
float3 color = vec3.rgb;
l
float3 position = 1.xxx;