   Implicit truncation of vector type
  I have a really simple shader to do some simple diffuse lighting but I keep getting these errors/warnings from the shader compiler:p.shader(17,15): warning X3206: implicit truncation of vector typep.shader(18,26): warning X3206: 'mul': implicit truncation of vector typep.shader(18,14): warning X3206: implicit truncation of vector typeAnyone know what I'm doing wrong here?  How do I do an explicit truncation (from float4 to float3)?Thanks.float4x4 matWorldViewProj; float4x4 matWorld; float4 vecLightDir;struct VS_OUTPUT{float4 Pos : POSITION;float3 Light : TEXCOORD0;float3 Norm : TEXCOORD1;};VS_OUTPUT VERTEXMAIN(float4 Pos : POSITION, float3 Normal : NORMAL){VS_OUTPUT Out = (VS_OUTPUT)0;Out.Pos = mul(Pos, matWorldViewProj);Out.Light = vecLightDir;Out.Norm = normalize(mul(Normal, matWorld));return Out;}float4 PIXELMAIN(float3 Light: TEXCOORD0, float3 Norm : TEXCOORD1) : COLOR{float4 diffuse = { 1.0f, 0.0f, 0.0f, 1.0f};float4 ambient = {0.1, 0.0, 0.0, 1.0}; return ambient + diffuse * saturate(dot(Light, Norm));}   
  If I change the vertex shader to this (below), it works ok.  I have to explicitly cast the float4 to a float3, but it won't let me explicitly cast the float3 to a float4 for the mul, so I'm manually copying the components in (!).  Surely this isn't correct?VS_OUTPUT Out = (VS_OUTPUT)0;  Out.Pos = mul(Pos, matWorldViewProj);Out.Light = (float3)vecLightDir;float4 n; n.x = Normal.x;n.y = Normal.y;n.z = Normal.z;n.w = 0;Out.Norm = (float3)normalize(mul(n, matWorld));return Out;;  What I have done in the past isOut.Norm = normalize(mul(n, (float3x3)matWorld));With n and Out.Norm being a float3.Just looking at it, it really shouldn't work, should it?EDIT:Answering my own question, yes that works since it's in vectors and not a C array. Need more coffee this morning!   ;  Instead of your 5 line creation of n, you can just write float4(normal,0) (create a float4 from a float3 and a float).Also, instead of casting the result of the normalize to a float3, it's more common to write n = normalize( ... ).xyz; (take the x, y & z components of a float4 and use them as a float3).   ;  Ok, thanks for the tips.   