WebGL around the net, 14 Jan 2010

Two new links for today:

  • I’d been wondering how long it would be before someone put together a multi-player WebGL game (or at least demo); it looks like Peter Strohm has managed to get the first one done! (Minefield only right now.)
  • Don’t know how I missed this one on the EWGL blog — some musings on the costliness of looking up uniform locations, explaining why you shouldn’t do it every time you repaint the canvas (which is something my own code is definitely guilty of). Useful stuff, and perhaps reason enough for another round of retrospective changes here…

On the subject of the lessons, I’ve finished the first cut of the code for lesson 13, which introduces per-fragment lighting. Let me know what you think!

You can leave a response, or trackback from your own site.

5 Responses to “WebGL around the net, 14 Jan 2010”

  1. Paul Brunt says:

    Lesson 13 is looking great, the per pixel lighting has such a big impact, it’s nice to be able to see the contrast between the two methods with a click of the mouse!

    Looks like you missed the a “1-” on a texture coord in the per-fragment shader or added one in the per-vertex as the textures are flipping.

  2. WebGLU caches attribute and uniform locations once at link time rather that getting them every frame

  3. giles says:

    @Paul — thanks! Well spotted re: the textures, looks like I missed out the “1-” in the per-fragment shader.

    @Benjamin — very sensible. I think I’m going to update the older lessons here to do the same thing, perhaps by attaching them (and the attribute refs) to the program object.

  4. giles says:

    Yup, it’s looking good, isn’t it? I’ll be linking to them in today’s roundup. Maybe Eric Shepherd will wind up obsoleting my lessons :-S

    His animated textures are really cool — Murphy and I were talking about that in the comments just the other day! http://learningwebgl.com/blog/?p=1471&cpage=1#comment-697

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter