Jademalo

BT.709 to BT.601.hlsl

Nov 26th, 2016
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. sampler s0;
  2. float2 c0;
  3.  
  4. float4 main(float2 tex : TEXCOORD0) : COLOR
  5. {
  6. float4 si = tex2D(s0, tex);
  7. float3 s1 = si.rgb;
  8. s1 = float3(dot(float3(.2126, .7152, .0722), s1), dot(float3(-.1063/.9278, -.3576/.9278, .5), s1), dot(float3(.5, -.3576/.7874, -.0361/.7874), s1));
  9. return float3(s1.x+1.402*s1.z, dot(s1, float3(1, -.202008/.587, -.419198/.587)), s1.x+1.772*s1.y).rgbb;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment