Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

warning x3206 implicit truncation of vector type

$
0
0

@Andrew_O_Bannon wrote:

  1. float Percentage;

  2. sampler TextureSampler: register(s0);

  3. float4 PixelShaderFunction(float2 Tex: TEXCOORD0) : COLOR0
  4. {
  5. float4 Color = tex2D(TextureSampler, Tex);
  6. float r = Color.r;
  7. float g = Color.g;
  8. float b = Color.b;
  9. Color.rgb = dot(Color.rgb, float3(0.7 * Percentage, 0.59 * Percentage, 0.11 * Percentage));
  10. r = r - (r - Color.rgb) * Percentage;
  11. g = g - (g - Color.rgb) * Percentage;
  12. b = b - (b - Color.rgb) * Percentage;
  13. Color.r = r;
  14. Color.g = g;
  15. Color.b = b;

  16. return Color;

  17. }

  18. technique tech

  19. {
  20. pass Pass1
  21. {
  22. PixelShader = compile ps_4_0_level_9_1
  23. PixelShaderFunction();
  24. }
  25. }

I've been knocking around shaders in monogame and found this example. but it shows me a warning
"warning x3206 (13,2 - 37) implicit truncation of vector type
"warning x3206 (14,2 - 38) implicit truncation of vector type
"warning x3206 (15,2 - 37) implicit truncation of vector type"

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles