Migrating custom Forge viewer shaders to WebGL 2 Part 2

A few posts ago I mentioned some work was needed to migrate our Dasher 360 shaders to the latest version of the Forge viewer (or the one after it). This work is now complete, so I can share a few thoughts and comments on what was needed to make this happen.

Before doing that, though, I need to thank Elias Cohenca for his valuable help during this process: I can honestly say that without his help the migration would either not have happened or would remain a work in progress. Thanks, Elias!

First view of sensors in NEST

Firstly, it’s important to note that even if you have custom shaders, there’s a reasonable chance that they will just work when moving from WebGL 1 to 2 (or from v7.9 or below of the Forge viewer to v7.10 or above). There are syntactical changes between WebGL 1 and 2, but in the Forge viewer these are handled by some pre-processor directives that auto-translate GLSL 1.00 to GLSL ES 3.00 (i.e. WebGL 1 to 2). So it’s very possible to write shaders that work with both WebGL 1 or 2 (in fact…

Read more