three-bmfont-text
Advanced tools
Comparing version
{ | ||
"name": "three-bmfont-text", | ||
"version": "1.0.7", | ||
"version": "1.1.0", | ||
"description": "renders BMFont files in ThreeJS with word-wrapping", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,2 +26,4 @@ var xtend = require('xtend') | ||
fragmentShader: [ | ||
"#define SQRT2 1.4142135623730951", | ||
"uniform float opacity;", | ||
@@ -35,4 +37,5 @@ "uniform vec3 color;", | ||
"vec4 texColor = texture2D(map, vUv);", | ||
"float dst = texColor.a;", | ||
"float alpha = smoothstep(0.5 - smooth, 0.5 + smooth, dst);", | ||
"float dst = texColor.a;", | ||
"float afwidth = smooth * SQRT2 / (2.0 * gl_FragCoord.w);", | ||
"float alpha = smoothstep(0.5 - afwidth, 0.5 + afwidth, dst);", | ||
@@ -39,0 +42,0 @@ "gl_FragColor = vec4(color, opacity * alpha);", |
16451
0.7%294
0.68%