diff --git a/data/ofxGPUFont/shaders/DEBUG_ES3/font.frag b/data/ofxGPUFont/shaders/DEBUG_ES3/font.frag index bb956ef..32c61d4 100644 --- a/data/ofxGPUFont/shaders/DEBUG_ES3/font.frag +++ b/data/ofxGPUFont/shaders/DEBUG_ES3/font.frag @@ -108,17 +108,6 @@ vec2 rotate(vec2 v) { } void main() { - //vec4 debug = texture(curves, vec2(uv.x, 0.5)); - //ivec4 debug = texelFetch(glyphs, ivec2(uv.x * float(textureSize(glyphs, 0).x), 0), 0); - //result = vec4(debug.rgb, 1.0); - - //Glyph gly = loadGlyph(bufferIndex); - //result = vec4((float(gly.start) / 1883.0), (float(gly.count) / 42.0), 0.0, 1.0); - - // verify bufferIndex [x] - //result = vec4((float(bufferIndex) / 100.0), 0.0, 0.0, 1.0); - //return; - float alpha = 0.0; // Inverse of the diameter of a pixel in uv units for anti-aliasing. @@ -137,25 +126,13 @@ void main() { alpha += computeCoverage(inverseDiameter.y, rotate(p0), rotate(p1), rotate(p2)); } } - // DEBUG - //if (uv.x > 0.5) { - //ivec2 ts = textureSize(curves,0); - //float w = float(ts.x); - //float h = float(ts.y); - ////float green = (float(glyph.count) / 27.0); - //float green = float(w) / (3.0 * 27.0); - //result = vec4(0.0,h * 0.5,0.0,1.0); - //} else { - //result = vec4(0.0,0.5,0.0,1.0); - //} - //return; if (enableSuperSamplingAntiAliasing) { alpha *= 0.5; } alpha = clamp(alpha, 0.0, 1.0); - result = color * alpha; + result = vec4(color.rgb, color.a * alpha); if (enableControlPointsVisualization) { // Visualize control points. diff --git a/data/ofxGPUFont/shaders/GL3/font.frag b/data/ofxGPUFont/shaders/GL3/font.frag index feb844a..5bcf06f 100644 --- a/data/ofxGPUFont/shaders/GL3/font.frag +++ b/data/ofxGPUFont/shaders/GL3/font.frag @@ -124,17 +124,13 @@ void main() { alpha += computeCoverage(inverseDiameter.y, rotate(p0), rotate(p1), rotate(p2)); } } - //vec4 debug = texelFetch(glyphs, int(uv.x * textureSize(glyphs))); - //result = vec4(debug.rgb, 1.0); - - //return; if (enableSuperSamplingAntiAliasing) { alpha *= 0.5; } alpha = clamp(alpha, 0.0, 1.0); - result = color * alpha; + result = vec4(color.rgb, color.a * alpha); if (enableControlPointsVisualization) { // Visualize control points.