// LFS pixel shader for Rift DK2 // Pixel shader input struct PS_INPUT { float4 Col : COLOR0; float2 TexR : TEXCOORD0; float2 TexG : TEXCOORD1; float2 TexB : TEXCOORD2; }; // Pixel shader output struct PS_OUTPUT { float4 Col : COLOR0; }; // Global variables sampler2D Sampler; // Pixel shader PS_OUTPUT ps_main(in PS_INPUT In) { PS_OUTPUT Out; float R = tex2D(Sampler, In.TexR).r; float G = tex2D(Sampler, In.TexG).g; float B = tex2D(Sampler, In.TexB).b; Out.Col = In.Col * float4(R, G, B, 1.0f); return Out; }