5 Replies Latest reply on Aug 13, 2010 2:27 PM by danbartlett@ntlworld.com

    float3 from float4


      What's the correct way to downcast a float4 into a float3 discarding the .w component, pls?


      float4 b;


      1. float3 a = as_float3(b); //this should be ok

      2. float3 a = (float3)b; //I'm not sure about this

      3. float3 a = (float3)(b.x,b.y,b.z); //obviously ok, but I want it simpler.