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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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