Hacker News new | ask | show | jobs
by pcwalton 4475 days ago
> WebGL is a deliberately limited but secure sandbox based on a spec for mobile devices that is two major releases out of date and makes an Xbox 360 look like science fiction.

Unreal Engine 4 is a counterexample.

> Asm.js is an enormous hack where we limit the computational expressiveness of performance critical code by the semantics and standard library of a language notoriously shit at it.

How is it limited?

2 comments

To be honest, the video in TFA looks like something out of a 2009 game, it's not particularly impressive. And I guess it'll probably be a rolling demo, not having the requirements of a complete game that also has to handle a bunch of computationally expensive stuff like collisions, game logic etc.
"Unreal Engine 4" is marketing buzzspeak. WebGL is modelled after OpenGL ES 2. Its GLSL support is massively outdated. It lacks features like multiple render targets (used by any deferred renderer in the XB360 era, e.g. Unreal Engine 3), geometry shaders, multisampled reads (for HDR MSAA and hybrid spatial/temporal AA techniques), and tons of other common techniques.

Asm.js is limited by having no 32-bit float type, no 64-bit int type, no SIMD, no dynamic memory allocation and the fact that they had to extend the language from day 1 just to be able to multiply a 32-bit integer by another quickly.

You may want to actually inform yourself.

> "Unreal Engine 4" is marketing buzzspeak. WebGL is modelled after OpenGL ES 2. Its GLSL support is massively outdated. It lacks features like multiple render targets (used by any deferred renderer in the XB360 era, e.g. Unreal Engine 3), geometry shaders, multisampled reads (for HDR MSAA and hybrid spatial/temporal AA techniques), and tons of other common techniques.

WebGL 2.0 has many of the extensions and is in Editor's Draft status: http://www.khronos.org/registry/webgl/specs/latest/2.0/ It has a prototype implementation already: https://wiki.mozilla.org/Platform/GFX/WebGL2

> Asm.js is limited by having no 32-bit float type, no 64-bit int type, no SIMD, no dynamic memory allocation and the fact that they had to extend the language from day 1 just to be able to multiply a 32-bit integer by another quickly.

asm.js has 32-bit floats already: https://hacks.mozilla.org/2013/12/gap-between-asm-js-and-nat...

64-bit ints and SIMD are being discussed on TC39 right now. Dynamic memory allocation (assuming you mean growing the typed array) isn't that important and we have ways to do it if we need to.

> You may want to actually inform yourself.

This kind of comment is emblematic of HN's evaporative cooling, especially when it's inaccurate. :(