Skip to content

Commit ebed8f6

Browse files
committed
sdf-text fixes for the browser
1 parent aef20c0 commit ebed8f6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sdf-text/assets/SDFFont.frag

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#ifdef GL_ES
2+
precision highp float;
3+
#endif
4+
15
uniform sampler2D texture;
26
uniform vec2 scale;
37
uniform vec4 color;

sdf-text/main.js

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Window.create({
4040
var ctx = this.getContext();
4141
var res = this.getResources();
4242

43+
ctx.getGL().getExtension('OES_standard_derivatives')
44+
4345
this.fontTex = ctx.createTexture2D(res.fontImage, res.fontImage.width, res.fontImage.height, { mipmap: false })
4446

4547
this.gui = new GUI(ctx, this.getWidth(), this.getHeight());

0 commit comments

Comments
 (0)