gfx/angle/src/libGLESv2/renderer/shaders/Blit.vs

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 //
     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.
     5 //
     7 struct VS_OUTPUT
     8 {
     9     float4 position : POSITION;
    10     float4 texcoord : TEXCOORD0;
    11 };
    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)
    21 {
    22     VS_OUTPUT Out;
    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);
    27     return Out;
    28 };
    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)
    36 {
    37     VS_OUTPUT Out;
    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);
    42     return Out;
    43 };

mercurial