struct VS_OUTPUT { float4 pos: SV_POSITION; float4 col: COLOR0; }; VS_OUTPUT vertstripe_vs( float4 Pos : POSITION ) { VS_OUTPUT outp; outp.pos = Pos; // split into left/right eye // note: the 0.055f is to undo the off-center change for canting float eye_independent_x; if(Pos.x < 0) { eye_independent_x = Pos.x -0.055f + 0.5f; } else { eye_independent_x = Pos.x +0.055f - 0.5f; } // check which quadrant we're in, then choose the color if(eye_independent_x < 0) { if(Pos.y >= 0) { // upper left, orange outp.col = float4(1.0f, 0.482f, 0.0f, 1.0f); } else { // lower left, blue outp.col = float4(0.357f, 0.988f, 1.0f, 1.0f); } } else { if(Pos.y >= 0) { // upper right, purple outp.col = float4(1.0f, 0.0f, 1.0f, 1.0f); } else { // lower right, yellow outp.col = float4(1.0f, 0.976f, 0.337f, 1.0f); } } return outp; }