title: DirectX HLSL shader implicit truncation of vector type error
body: <p>Hi I'm getting an error in one my pixel shaders, implicit truncation of vector type. </p>
  
  <p>Here is the code causing the error:</p>
  
  <pre><code>float3 colour = 0;
  float3 ppColour = SceneTexture.Sample(PointSample, ppIn.UV);
  float4 col = SceneTexture.Sample(PointSample, ppIn.UV);
  float intensity = 0.0f;
  float r = SceneTexture.Sample(PointSample, ppIn.UV).r;
  float g = SceneTexture.Sample(PointSample, ppIn.UV).g;
  float b = SceneTexture.Sample(PointSample, ppIn.UV).b;
  float a = SceneTexture.Sample(PointSample, ppIn.UV).a;
  intensity = r + g + b + a;
  
  if (intensity &gt; 5.0f)
  {
      for (int count = 0; count &lt; 13; count++)
      {
          colour += SceneTexture.Sample(TrilinearSampler, ppIn.UV + PixelKernel[count] * BlurStrength) * BlurWeights[count];
      }
      return float4(colour, 1.0f);
  }
  
  return float4(ppColour, 1.0f);
  </code></pre>
  
  <p>If I comment out intensity = r + g + b + a; then the project compiles. Can anyone see what I'm doing wrong, thanks.</p>