mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update WR and shaders (initial subpixel AA work).
This commit is contained in:
parent
784ca17dc0
commit
e9c6ee30a1
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