mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 772726. Part 4: Fix SampleTextTexturesPS(Masked) shaders to premultiply TextColor. r=jrmuizel
--HG-- extra : rebase_source : 76781e7f69db6d47b3ecf8d8c37bac284133c6be
This commit is contained in:
parent
d5e555eeca
commit
c6748c7b62
@ -301,7 +301,7 @@ float4 SampleMaskShadowVPS( VS_OUTPUT In) : SV_Target
|
||||
PS_TEXT_OUTPUT SampleTextTexturePS( VS_OUTPUT In) : SV_Target
|
||||
{
|
||||
PS_TEXT_OUTPUT output;
|
||||
output.color = TextColor;
|
||||
output.color = float4(TextColor.r, TextColor.g, TextColor.b, 1.0);
|
||||
output.alpha.rgba = tex.Sample(sSampler, In.TexCoord).bgrg * TextColor.a;
|
||||
return output;
|
||||
};
|
||||
@ -312,7 +312,7 @@ PS_TEXT_OUTPUT SampleTextTexturePSMasked( VS_OUTPUT In) : SV_Target
|
||||
|
||||
float maskValue = mask.Sample(sMaskSampler, In.MaskTexCoord).a;
|
||||
|
||||
output.color = TextColor * maskValue;
|
||||
output.color = float4(TextColor.r, TextColor.g, TextColor.b, 1.0);
|
||||
output.alpha.rgba = tex.Sample(sSampler, In.TexCoord).bgrg * TextColor.a * maskValue;
|
||||
|
||||
return output;
|
||||
|
1771
gfx/2d/ShadersD2D.h
1771
gfx/2d/ShadersD2D.h
File diff suppressed because it is too large
Load Diff
5
gfx/2d/genshaders.sh
Normal file
5
gfx/2d/genshaders.sh
Normal file
@ -0,0 +1,5 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
fxc ShadersD2D.fx -nologo -FhShadersD2D.h -Tfx_4_0 -Vn d2deffect
|
Loading…
Reference in New Issue
Block a user