News for hackers. Stuff that matters.
Re:Show HN: War and Peace and WebGL by IvanK_net on Sunday January 24, 2016 @11:16AM (#10962902)
This discussion reminds me times 4 years ago, when I showed my WebGL games to my firends and instead of getting an interesting feedback, 90% of comments were about my games not working on their devices. Sad to see the same thing in 2016 :(
Re:Show HN: War and Peace and WebGL by chippy on Sunday January 24, 2016 @01:25PM (#10963387)
Oddly, my machines really did creak with WebGL, but it appears as if they have been improving in performance. It's probably not graphic drivers as this ubuntu laptop hasn't had a new graphics driver since 2013. It must be the browsers improving performance. Anyone else noticed WebGL working better these days on the same hardware?
Re:Show HN: War and Peace and WebGL by overgard on Sunday January 24, 2016 @02:50PM (#10963738)
I work on the renderer for a product that uses WebGL (I won't link to it because I don't want to sound like a shill, but it's a web based 3d modeler called FormIt).

Unfortunately, I think webgl performance has actually been getting much worse on Chrome. (Firefox has been fine).

WebGL is pretty exciting in what it makes possible, but it's based on the OpenGL ES2 spec from 2007 which is way out of date at this point, so the surface area of the hardware you can actually use is really limited, and various aspects of javascript lead to some really ugly performance compromises. This is partially why I'm pretty excited about web assembly -- I don't think it'll fix everything off the bat, but not having to go through javascript could be a really big win.

Re:Show HN: War and Peace and WebGL by seangrant on Sunday January 24, 2016 @12:19PM (#10963109)
New technology is always full of naysayers and people pointing out the obvious defects. Real innovation comes from recognizing and realizing the potential of it.
Re:Show HN: War and Peace and WebGL by fla on Sunday January 24, 2016 @09:32AM (#10962584)
I'm curious about the choice of bmp for http://wdobbie.com/warandpeace/glyphs.bmp

Why not a png ?

Edit: So after a quick test:

* glyphs.bmp 53.5 MB

* glyphs.png 7.6 MB

I guess it could be shrinked even more.

Re:Show HN: War and Peace and WebGL by wjd on Sunday January 24, 2016 @09:45AM (#10962621)
The .bmp file is served gzipped to 7 MB.

LZMA and Bzip2 both get it down to about 3 MB but I'd need to use a javascript decompressor.

Re:Show HN: War and Peace and WebGL by fla on Sunday January 24, 2016 @12:08PM (#10963067)
Makes sense. My bad, I tested with wget and compression was disabled.
Re:Show HN: War and Peace and WebGL by smy1es on Sunday January 24, 2016 @01:03PM (#10963283)
It works well for me in several platforms.

What would improve it is when you zoom, with the mouse wheel or gesture if it would zoom in on the mouse cursor point rather than at the centre of the screen.

Re:Show HN: War and Peace and WebGL by arethuza on Sunday January 24, 2016 @09:31AM (#10962580)
Works fine, and is rather impressive, on Windows 10 - both in FF and Chrome.

Doesn't work on iPad - just get blank pages.

Re:Show HN: War and Peace and WebGL by kyriakos on Sunday January 24, 2016 @01:32PM (#10963412)
Windows 10 chrome. doesn't work. chrome canary didn't work (some d3d errors) edge (i gave up after waiting for 2 minutes to load)
Re:Show HN: War and Peace and WebGL by scotty79 on Sunday January 24, 2016 @10:27AM (#10962738)
Doesn't work on Windows 10 for me, neither FF nor Chrome.
Re:Show HN: War and Peace and WebGL by muglug on Sunday January 24, 2016 @11:20AM (#10962917)
Strange - works for me on an iPad Pro with latest iOS.
Re:Show HN: War and Peace and WebGL by marcosscriven on Sunday January 24, 2016 @11:24AM (#10962924)
Worked for me on iPad mini 2, albeit very slowly.
Re:Show HN: War and Peace and WebGL by fizixer on Sunday January 24, 2016 @12:56PM (#10963250)
Not really sure this is an unsolved problem in other contexts. For example, any good image viewer would have no-shimmering at all scales.

You simply render your text as images and then apply the method already used by the image viewers.

Re:Show HN: War and Peace and WebGL by timon999 on Sunday January 24, 2016 @11:21AM (#10962919)
I'm getting some weird artifacts: http://i.imgur.com/U3sSkW3.png

Ubuntu Gnome, AMD open source driver

Re:Show HN: War and Peace and WebGL by greggman on Sunday January 24, 2016 @02:58PM (#10963770)
interesting technique but it's extremely slow on Intel Iris Pro 1536 MB (and so I assume other machines). Like when zoomed in it's under 2fps whereas I suspect the built in chrome text renderer can do that much faster (generating texture glyphs of the needed characters at the desired res and then rendering them). I'm curious why drawing less characters (like 5 giant characters) runs at 2fps. Is the shader that heavy?
Re:Show HN: War and Peace and WebGL by exDM69 on Sunday January 24, 2016 @08:26AM (#10962426)
I see all white pages with no text on them. "Show grid" shows yellow and green rectangles. Linux, Firefox 43, Nvidia proprietary drivers.
Re:Show HN: War and Peace and WebGL by wjd on Sunday January 24, 2016 @09:42AM (#10962610)
Loaded up linux and I got the same issue. Working on it!
Re:Show HN: War and Peace and WebGL by wjd on Sunday January 24, 2016 @11:05AM (#10962856)
Should be fixed now!
Re:Show HN: War and Peace and WebGL by exDM69 on Monday January 25, 2016 @04:20AM (#10966291)
Yes, works like a charm now. Really nicely rendered. Good job!

What was the issue?

Re:Show HN: War and Peace and WebGL by hansjorg on Sunday January 24, 2016 @02:03PM (#10963539)
Works great with FF43 and Nvidia proprietary drivers now.
Re:Show HN: War and Peace and WebGL by green7ea on Sunday January 24, 2016 @08:54PM (#10965135)
That fixed it for me, that was quick.
Re:Show HN: War and Peace and WebGL by green7ea on Sunday January 24, 2016 @09:25AM (#10962561)
Same here, all white on chrome, linux, nvidia proprietary. The previous text rendering demo worked on the same setup.
Re:Show HN: War and Peace and WebGL by fla on Sunday January 24, 2016 @09:29AM (#10962573)
Me too. The previous version of the demo used to work.

Chrome 47.0.2526.73 (64 Bit) Linux

Re:Show HN: War and Peace and WebGL by aurelian15 on Sunday January 24, 2016 @09:28AM (#10962571)
Works flawlessly here, Linux, Fedora 23, Firefox 42, Radeon HD 7770, open source driver
Re:Show HN: War and Peace and WebGL by Theodores on Sunday January 24, 2016 @10:45AM (#10962797)
Same here, Ubuntu + built in Intel display.
Re:Show HN: War and Peace and WebGL by cimbal on Sunday January 24, 2016 @01:15PM (#10963343)
I really like this demo, but it reliably crashes a mid 2012 macbook pro with lion, both on firefox and safari (the older version of the demo was the same).

Now, reading the other comments, i wonder if there are any tools that help with diagnosing device capabilities? I don't have high hopes of integrating anything WebGL related in my projects due to these problems, so how can you make sure that WebGL code will work across devices?

Edit: How can you make sure you notice when it's not working?

Re:Show HN: War and Peace and WebGL by moron4hire on Sunday January 24, 2016 @09:21AM (#10962550)
It's almost completely unreadable on my Android phone. The character shapes are mostly there, but the triangles overlap in weird ways, like vertex order might be wrong it something.

https://www.dropbox.com/s/cvutftylbj77d8r/Screenshot_2016-01...

https://www.dropbox.com/s/u3qn9h5pgw2p671/Screenshot_2016-01...

https://www.dropbox.com/s/y4h93ycueykrjai/Screenshot_2016-01...