Brandon Jones
blog.tojicode.com · Personal blog · on HN since 2011
Brandon Jones, a Google engineer, writes about WebGL, WebVR, browser graphics, and game ports to the web.
What HN saysHN cites his posts on WebVR specs and holistic WebGL, and a commenter quotes his observation about how people actually use browsers.
41HN people shared it
25linked it in comments
33stories submitted
798story points
6 years agolast shared
2011people per year2026
Most-shared posts
- 1Q3bsp13 people · first shared 2011
- 2Bringing VR to Chrome5 people · 32 points · first shared 2014 · 6 comments on HN
- 3Notch, WebGL, Dart, and ramping up quickly2 people · 348 points · first shared 2013 · 196 comments on HN
- 4A Tale of two Web Technologies2 people · 9 points · first shared 2013 · 1 comments on HN
- 5How Blink has affected WebGL?2 people · 3 points · first shared 2013 · discussion on HN
- 6RAGE WebGL Tech Talk2 people · 2 points · first shared 2011 · discussion on HN
- 7Efficient JavaScript Vector Math2 people · 2 points · first shared 2013 · 1 comments on HN
- 8IOS RAGE rendered with WebGL1 people · 154 points · first shared 2011 · 10 comments on HN
- 9Team Fortress 2 in WebGL1 people · 116 points · first shared 2011 · 34 comments on HN
- 10Three.js/Ammo.js Quake 3 Physics Test1 people · 44 points · first shared 2012 · 20 comments on HN
- 11Team Fortress 2 level rendered entirely in WebGL1 people · 20 points · first shared 2011 · discussion on HN
- 12What's coming in WebGL 2.01 people · 13 points · first shared 2013 · discussion on HN
- 13Building the WebGL Game: Part 3 - Skinning & Animation1 people · 11 points · first shared 2011 · discussion on HN
- 14Using WEBGL_depth_texture1 people · 6 points · first shared 2012 · discussion on HN
- 15Building the WebGL Game: Part 6 - Isosurface Landscapes1 people · 5 points · first shared 2012 · discussion on HN
What HN people wrote when they linked it
fridek · 2015-06-09
One of my all-time favorite quotes on browsers, from http://blog.tojicode.com/2013/08/holistic-webgl.html
"Have you actually seen how people use web browsers? Honestly it's kind of horrifying. It's not unusual for people to have 100+ tabs open across several different browser windows in a session that's been running continuously since sometime in the late 90s."
I was one of those 1k+ tabs people until recently, when I just admitted I'm not going back to read any of this stuff. Considering Chrome team has finite resources I'm glad they spend it on use cases resolving around actually browsing things over just keeping them unread forever.
pyalot2 · 2013-02-03
Brandon Jones does a bit of Unity 3D exporting to WebGL, you should read up on his blog: http://blog.tojicode.com/
I've heard rumors Unity 3D is thinking of a full blown WebGL exporter as well, no idea if real/soon/at-all.
cromwellian · 2013-03-27
(on Scaling) Games usually scaled based on GPU power, but not so much on the core game logic, AI, etc. Any CPU processing that actually affects gameplay outcome (e.g. collision detection) cannot really be disabled and scaled. Otherwise, you end up playing a different game based on your machine, not a game that only looks uglier or plays choppy.
This demo looks great, but all I see are environments rendered. I didn't see any firefights between lots of player models or vehicles, no Havok/PhysX/Bullet, I didn't see any enemy AI running. I did see some frame rate hitching. It's not the first time someone's had environments (sans game) running, see for example Quake3 (http://media.tojicode.com/q3bsp/). Even the Rage Engine got an environment renderer ported to the Web.
There's a danger in overselling stuff. When I helped port Quake2 to the Web (GwtQuake), I didn't have any illusions about being able to run something like Crysis or Call of Duty series in the the browser in JS, or consume the same resource requirements. I mean, I thought it would be possible, but a hideous waste of system resources.
There was a time when Sun was marketing Java and pushing heavily on this idea that it would one day meet or beat C/C++ performance, but it never quite got there after 2 decades (yes, in some circumstances it comes close, in others, it fairs badly). I see the same parallels today, pushing the idea that a dynamically typed language with some extra 'hints' is going to match a language…
skunkworker · 2020-08-20
Maybe in a few years when WebAssembly and WebGL advance more, early last year someone posted a port of doom 3 running completely in the browser.
https://media.tojicode.com/q3bsp/
monocasa · 2018-05-04
No, it's occlusion culling (offline baked as far as I understand it).
It really reminds me of RAGE for the iPhone.
https://blog.tojicode.com/2011/05/rage-webgl-tech-talk.html
mixedbit · 2016-12-22
As far as I know Microsoft plans to support and contributes to WebVR work. Microsoft involvement and requirements were the reason for the most recent (1.1) spec update. This was explained by Brandon Jones here: http://blog.tojicode.com/2016/09/update-on-webvr-spec-chrome-and-https…
warfangle · 2016-05-06
Quake 3 doesn't work for you? :)
http://media.tojicode.com/q3bsp/
nicklaf · 2015-10-21
Thinking about your comment made me realize that the lackluster performance often seen in WebGL pages has very little to do with overhead in WebGL itself, and a lot to do with the application developer's failure to optimize for performance.
Native Quake III on a Pentium 4-era system was much smoother than most of the WebGL stuff I see on a modern system, but the fact that a WebGL demo [1] of a subset of Quake III is very smooth seems to support this idea.
You make a lot of good points about the difficulties that the low-level nature of graphics programming present to standardization. I agree that there probably isn't necessarily an easy solution to this which doesn't unnecessarily restrict the space of possibilities in the name of performance or interoperability.
[1] http://media.tojicode.com/q3bsp/
corysama · 2014-11-10
brian_peiris · 2014-10-05
OP here. I like where you're going with that. If you weren't already aware, you definitely need to integrate WebVR. A couple of devs from Mozilla and Google are adding VR APIs to Firefox and Chrome.
Join the mailing list: https://mail.mozilla.org/listinfo/web-vr-discuss
More info:
http://blog.bitops.com/blog/2014/06/26/first-steps-for-vr-on-the-web/
http://blog.tojicode.com/2014/07/bringing-vr-to-chrome.html
moron4hire · 2014-09-12
Perhaps for now, but I believe an HTML5 API is in the works for this, so eventually the browsers should have built in support.
For Firefox: http://blog.bitops.com/blog/2014/06/26/first-steps-for-vr-on-the-web/
For Chrome: http://blog.tojicode.com/2014/07/bringing-vr-to-chrome.html
And a Three.js sample that supposedly works if you have one of these special builds installed: http://threejs.org/examples/#webgl_effects_vr
frik · 2014-09-07
Notch (creator of Minecraft) uses it for some smaller WebGL games: http://blog.tojicode.com/2013/12/notch-webgl-dart-and-ramping-up-quick… and on HN https://news.ycombinator.com/item?id=6841557
idlewan · 2014-07-11
I like the concept of the web jumping to the next device/interface.
After the desktop, after mobile, there might be VR in a few years. The pattern will surely repeat itself, with faster experiences for native, compiled applications, but I wonder if the "good enough" will come quicker thanks to webgl.
Looking forward to what Vladimir Vukićević and Josh Carpenter ([0] from Mozilla) and Brandon Jones ([1] from the Chrome team) are doing!
[0]: http://www.roadtovr.com/firefox-gets-vr-api-browser-based-virtual-real…
[1]: http://blog.tojicode.com/2014/07/bringing-vr-to-chrome.html
nailer · 2013-11-08
So:
- Every browser now supports WebGL
- This would allow their customers to play Quake without plugins OR downloads (eg, this demo http://media.tojicode.com/q3bsp/)
and instead they ditch platforms and require an installer?
no_more_death · 2013-01-20
This submission is absolutely first-rate. Must-see for serious javascript developers. Note http://media.tojicode.com/sfjs-vectors/#35 in particular and remember that TypedArrays are not a silver bullet. It's a shame I'm (apparently) the only one who saw it.
patrickaljord · 2013-01-11
greggman · 2012-09-25
Canvas is directly implemented in gl (or directx) in most browsers at this point. WebGL is still faster like the poster above says because you as the programmer an can make optimizations that are not possible with the canvas api like drawing many things with one call.
http://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.html
acron0 · 2012-07-19
I hope this comes as a pleasant surprise then :)
http://media.tojicode.com/q3bsp/
albertzeyer · 2012-07-17
In Chrome: Go to chrome://flags/ and enable it.
Demo: http://media.tojicode.com/q3bsp/
Some docs:
https://developer.mozilla.org/en/API/Pointer_Lock_API
http://www.chromium.org/developers/design-documents/mouse-lock
ilaksh · 2012-07-16
Quake 3 WebGL demo http://media.tojicode.com/q3bsp/
GLSL test tool http://www.iquilezles.org/apps/shadertoy/
http://www.khronos.org/webgl/wiki/Getting_Started
WebGL is a cross-platform, royalty-free API used to create 3D graphics in a Web browser. Based on OpenGL ES 2.0, WebGL uses the OpenGL shading language, GLSL, and offers the familiarity of the standard OpenGL API.
WebGL is a low-level API, so it's not for the faint of heart. OpenGL's shading language, GLSL, is itself an entire programming environment.
magicalist · 2011-10-06
The author also gave a good break down of the map file format and the approach he took to rendering it in a previous post:
http://blog.tojicode.com/2011/09/source-engine-in-webgl-tech-talk.html
lkz · 2011-04-03
First Impression: Extremely simple and not very polished app compared to other WebGL demos such as the Quake 3 BSP app at http://media.tojicode.com/q3bsp/
pcwalton · 2013-03-27
> It's not the first time someone's had environments (sans game) running, see for example Quake3 (http://media.tojicode.com/q3bsp/).
Quake 3 was released in 1999. Unreal Engine 3 is a current and top-of-the-line engine for AAA games.
> There was a time when Sun was marketing Java and pushing heavily on this idea that it would one day meet or beat C/C++ performance, but it never quite got there after 2 decades (yes, in some circumstances it comes close, in others, it fairs badly).
This is totally different. asm.js is just a backwards compatible encoding of a different, much lower-level language. In fact, that lower-level language is in direct correspondence with the intermediate representation of a production-quality C++ compiler (clang)!
Sun never tried something like asm.js for Java; rather they claimed that the full language would be as fast as C and C++.
> memory, SIMD, layout, threading
asm.js gives full control over memory and full control over layout, with the exception of stuff like mmap() and mprotect() and self-modifying code.
SIMD is something that RiverTrail/ParallelArray can do. It should be added to asm.js.
As for threading, I'm personally in favor of an extension to allow a typed array to be shared between workers, races and all, with some primitives to allow synchronization. Not everybody is OK with this, but I personally believe we aren't likely to get to native performance without it. (Again, this is just my personal opinion; many disagree on whether…
bcoates · 2012-11-30
http://www.khronos.org/files/webgl/webgl-reference-card-1_0.pdf
http://www.khronos.org/files/opengles3-quick-reference-card.pdf
Look at the sources to http://media.tojicode.com/q3bsp/
Notice the clunky transitions between Javascript and some degenerate form of C where everything is a member function of some hairy stateful singleton global object.
Oh, and all that matrix math isn't part of WebGL, the API neither provides graphics-specific utility functions nor general-purpose math operations. You have to roll it yourself in Javascript. You know, the way you have to write your own layout engine to write a 2d webpage?
This is all before we even get to the shader, where they just threw up their hands and said, "fuck it, let's have them send GLSL source as a wire protocol"
Also, security problems, weird device whitelist/blacklist, Microsoft's reasonable "hell no" stance, etc. Taking WebGL seriously is sucking the air out of the room and preventing progress on satisfying the demand for sane 3d on the web.
aw3c2 · 2012-02-17
Direct link http://media.tojicode.com/q3bsp/