tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

debug_font.glsl (735B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2  * License, v. 2.0. If a copy of the MPL was not distributed with this
      3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #define WR_FEATURE_TEXTURE_2D
      6 
      7 #include shared,shared_other
      8 
      9 varying highp vec2 vColorTexCoord;
     10 varying mediump vec4 vColor;
     11 
     12 #ifdef WR_VERTEX_SHADER
     13 in vec4 aColor;
     14 in vec2 aColorTexCoord;
     15 
     16 void main(void) {
     17     vColor = aColor;
     18     vColorTexCoord = aColorTexCoord;
     19     vec4 pos = vec4(aPosition, 0.0, 1.0);
     20     pos.xy = floor(pos.xy + 0.5);
     21     gl_Position = uTransform * pos;
     22 }
     23 #endif
     24 
     25 #ifdef WR_FRAGMENT_SHADER
     26 void main(void) {
     27     float alpha = texture(sColor0, vColorTexCoord).r;
     28     oFragColor = vColor * alpha;
     29 }
     30 #endif