Font antialiasing in WebGL

Discussion and feedback on Construct 2

Post » Wed Sep 05, 2012 8:50 pm

Hey, is this a limitation or bug in the way fonts are drawn when WebGL is enabled?

Text with WebGL disabled in Firefox:


Text with WebGL enabled in Firefox:


It's like there's no antialiasing when WebGL is enabled.
This is with r101. Same thing happens in Chrome.
B
31
S
6
G
1
Posts: 19
Reputation: 3,828

Post » Wed Sep 05, 2012 9:30 pm

Are you sure 'sampling' isn't set to 'point'?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Wed Sep 05, 2012 10:11 pm

I'm pretty sure it wasn't but I'll check tomorrow.
B
31
S
6
G
1
Posts: 19
Reputation: 3,828

Post » Wed Sep 05, 2012 11:22 pm

Since WebGL can't directly draw text, it actually renders to an offscreen canvas 2D then copies the result to the display. So in theory it should look identical, because both renderers draw text the same way. Of course, reality isn't always the same as theory :) Because WebGL treats text as a texture, text rendering is affected by the sampling and pixel rounding properties, which it isn't in canvas 2D. Do those settings affect it? Also a .capx example would help me investigate.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Thu Sep 06, 2012 9:22 pm

Sampling is set to Linear and Pixel Rounding is off.

Here's a .capx example. (r102)

I'm running this on a half year old laptop with Win7, Geforce GTX560M graphics card with latest drivers.soren2012-09-06 21:24:46
B
31
S
6
G
1
Posts: 19
Reputation: 3,828


Return to Construct 2 General

Who is online

Users browsing this forum: 8tomo8 and 9 guests