What are the technical hurdles that theoretically prevent Unity to WebGL deployment?

So it sounds like a lot of modern browsers now support WebGL and they are also dropping support for plugins. So if Unity were to give us a build to WebGL option, what features would we lose or technical problems would we have?

I know that there could be alternate routes to deploy plugins embed them ect, that’s been covered in other threads, the question is how close is WebGL to becoming a valid deployment platform.

For instance I would imagine that WebGL might not be up to DirectX 11 standards for shaders or deploying to WebGL would mean that our source code would have to be converted to javascript which would have a performance hit.

What other problems would you expect to encounter deploying your Unity projects to WebGL?

I think that all the source code would just be out in the open with JS or Dart so that’s no good.

A new physics engine would need to be implemented in JS which would probably be slow and take up lots of space.

All other aspects would have the same issues. Just a guess though.

Have you played around with the webgl exporter? It packs the scene assets into json and you use j3d to put it back together in the browser. None of the scripts come through so you have to write web javascript for all your interactions.

I had it working with the leap motion to manipulate it, but the only shader I could get to work was diffuse, not transparency and limited lighting.

But for static objects you want to show in 3d in the browser it’s good. Example http://leefromseattle.com/jsonB/page.html

No not yet, I keep peeking over the wall at WebGL demos/games and there are some really nice little demos with some snazzy shaders knocking about that just work without a plugin.

check out this demo, quite impressive:
http://forum.unity3d.com/threads/211556-Unreal-Engine-3-in-Firefox-with-asm-js

@Chelnok Yes looks great, although last time I checked Unreal did not have a build to WebGL option for the UDK version anyway.

You do realize that mono code can easily be decoded, so putting you game or app out using Webplayer is like giving your code away.

But there isn’t comments! :lol:

The more you look the more you realize there is out there found a comparison of WebGL libraries here

And here they are using Unity as part of the import and prototyping pipeline into their WebGL projects.

And there is the firefox asm.js project (asmjs.org) aiming to make super fast AOT compilation of javascript who are getting speeds up to half as fast as native C code.

What’s interesting about asm.js is that it builds it’s own heap and stack system that then circumvents the garbage collector, maybe UT could look into this, hint hint!

An overview and beautiful WebGL based website here

Problem with Dart is that, right now there is no browser except for a customized version of Chrome that natively runs Dart.

I’m actually looking into this language for the day job, since the team I’m on are dominantly C# developers who have found parts of JavaScript…disturbing.

Wow more web surfing and I found the first commercial game using WebGL