gfx/angle/src/libANGLE/renderer/d3d/d3d9/shaders/Blit.ps
author Morris Tseng <mtseng@mozilla.com>
Thu, 08 Sep 2016 16:28:30 +0800
changeset 354509 53735145cfbeede7164416318becd8e33dca53c9
parent 298486 56db457aef33a889004f51a6211f174aa12cca2d
child 400459 2fd9927e85ae56c93a8a453910d5e5acb89c6be9
permissions -rwxr-xr-x
Bug 1297924 - Update ANGLE to chromium/2845. r=jgilbert MozReview-Commit-ID: 2H0PBFFgmDp

//
// 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.
//

sampler2D tex : s0;

uniform float4 mult : c0;
uniform float4 add  : c1;

// Passthrough Pixel Shader
// Outputs texture 0 sampled at texcoord 0.
float4 passthroughps(float4 texcoord : TEXCOORD0) : COLOR
{
    return tex2D(tex, texcoord.xy);
};

// Luminance Conversion Pixel Shader
// Performs a mad operation using the LA data from the texture with mult.xw and add.xw.
// Returns data in the form of llla
float4 luminanceps(float4 texcoord : TEXCOORD0) : COLOR
{
    return (tex2D(tex, texcoord.xy).xw * mult.xw + add.xw).xxxy;
};

// RGB/A Component Mask Pixel Shader
// Performs a mad operation using the texture's RGBA data with mult.xyzw and add.xyzw.
// Returns data in the form of rgba
float4 componentmaskps(float4 texcoord : TEXCOORD0) : COLOR
{
    return tex2D(tex, texcoord.xy) * mult + add;
};