2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
9 float4 position : POSITION;
10 float4 texcoord : TEXCOORD0;
13 uniform float4 halfPixelSize : c0;
15 // Standard Vertex Shader
16 // Input 0 is the homogenous position.
17 // Outputs the homogenous position as-is.
18 // Outputs a tex coord with (0,0) in the upper-left corner of the screen and (1,1) in the bottom right.
19 // C0.X must be negative half-pixel width, C0.Y must be half-pixel height. C0.ZW must be 0.
20 VS_OUTPUT standardvs(in float4 position : POSITION)
24 Out.position = position + halfPixelSize;
25 Out.texcoord = position * float4(0.5, -0.5, 1.0, 1.0) + float4(0.5, 0.5, 0, 0);
30 // Flip Y Vertex Shader
31 // Input 0 is the homogenous position.
32 // Outputs the homogenous position as-is.
33 // Outputs a tex coord with (0,1) in the upper-left corner of the screen and (1,0) in the bottom right.
34 // C0.XY must be the half-pixel width and height. C0.ZW must be 0.
35 VS_OUTPUT flipyvs(in float4 position : POSITION)
39 Out.position = position + halfPixelSize;
40 Out.texcoord = position * float4(0.5, 0.5, 1.0, 1.0) + float4(0.5, 0.5, 0, 0);