Hash :
c7a41049
Author :
Date :
2014-06-23T12:03:25
Moved D3D specific files and folders under the D3D folder. Change-Id: I8afd67e08ee558fe94532c377d079673357a7192 Reviewed-on: https://chromium-review.googlesource.com/205229 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
struct VS_OUTPUT
{
float4 position : POSITION;
float4 texcoord : TEXCOORD0;
};
uniform float4 halfPixelSize : c0;
// Standard Vertex Shader
// Input 0 is the homogenous position.
// Outputs the homogenous position as-is.
// Outputs a tex coord with (0,0) in the upper-left corner of the screen and (1,1) in the bottom right.
// C0.X must be negative half-pixel width, C0.Y must be half-pixel height. C0.ZW must be 0.
VS_OUTPUT standardvs(in float4 position : POSITION)
{
VS_OUTPUT Out;
Out.position = position + halfPixelSize;
Out.texcoord = position * float4(0.5, -0.5, 1.0, 1.0) + float4(0.5, 0.5, 0, 0);
return Out;
};
// Flip Y Vertex Shader
// Input 0 is the homogenous position.
// Outputs the homogenous position as-is.
// Outputs a tex coord with (0,1) in the upper-left corner of the screen and (1,0) in the bottom right.
// C0.XY must be the half-pixel width and height. C0.ZW must be 0.
VS_OUTPUT flipyvs(in float4 position : POSITION)
{
VS_OUTPUT Out;
Out.position = position + halfPixelSize;
Out.texcoord = position * float4(0.5, 0.5, 1.0, 1.0) + float4(0.5, 0.5, 0, 0);
return Out;
};