float lum = dot(color.rgb, float3(0.299f, 0.587f, 0.114f));

Color is usually a float4 (R G B A), but here you only need (R G B)


xXxGuitar511
- Programmer