Update WR and shaders (initial subpixel AA work).

This commit is contained in:
Glenn Watson 2016-11-08 14:17:15 +10:00
parent 784ca17dc0
commit e9c6ee30a1
5 changed files with 34 additions and 18 deletions

View file

@ -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
}