mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #14122 - glennw:update-wr-subpx, r=emilio
Update WR and shaders (initial subpixel AA work). <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14122) <!-- Reviewable:end -->
This commit is contained in:
commit
8122d2c9da
5 changed files with 34 additions and 18 deletions
|
@ -3,6 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
void main(void) {
|
||||
#ifdef WR_FEATURE_SUBPIXEL_AA
|
||||
oFragColor = texture(sDiffuse, vUv);
|
||||
#else
|
||||
float a = texture(sDiffuse, vUv).a;
|
||||
#ifdef WR_FEATURE_TRANSFORM
|
||||
float alpha = 0.0;
|
||||
|
@ -10,4 +13,5 @@ void main(void) {
|
|||
a *= alpha;
|
||||
#endif
|
||||
oFragColor = vec4(vColor.rgb, vColor.a * a);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue