Jump to content

Enabling WebGL 2.0 for your HTML5 Games


chiguireitor
 Share

Recommended Posts

Hello everyone! I'm new here and wanted to share with you what i've accomplished over the weekend with the latest Chrome Canary builds and Nw.js, as i'm developing a game atm and i needed some capabilities of WebGL 2.0.

 

The post on my blog (no ads, promise) has everything explained.

 

Basically it boils down to:

 

  • Enabling the unsafe-es3 flag.
  • Migrating the shaders to ES3 dialect.
  • Configuring the new type of attachments and buffers.
  • Package the app with the latest NW.js beta.

That's it, feel free to comment and criticize here.

Link to comment
Share on other sites

Any plans for Phaser and WebGL2 you can share? I don't know about "Migrating the shaders to ES3 dialect", but I reckon this is a small task for the primary shader?

 

ES3 Dialect has some nuisances, and the extinction of the Varying type and the new in-out qualifiers is kinda awkward for the uninitiated.

 

However, "porting" the shaders to the new architecture is kinda straightforward.

Link to comment
Share on other sites

Yes there will be a Lazer WebGL2 renderer very soon (not one for Phaser though, sorry)

 

How long do you think a 5-10k LoC game would take to get ported over to Lazer? Just curious because I might take advantage of Lazer and work on the port if it's worth it. (Which it most likely is, but I am a lazy SOB :D)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...