Non-euclideanVR  2.0
Exploring Thurston's geometries in VR (shader part)
Non-euclideanVR Documentation

The shader is split in several files that need be concatenated as follows

The file geometry/model.glsl need be changed depending on the geometry. The path of this file is specified in the JS geometry library load by the Thurston object The other geometry depenedends sharders (definition of items, definition of subgroups) are built by the Thurston object based on block of codes declared on the Javascript file. (see items/model.xml and subgroups/model.xml).

Sadly, OpenGL does not seem to allow overloading built-in functions. Thus we followed the following naming rules. The rules for naming functions are the following:

  • If we are extending an GLSL function (e.g. dot, length, reflect, etc), then we use the same name as the GLSL function prefixed by geom.
  • If there is no analogue function (typically when we extend operators *,+,etc), then we use the same name as the Three.js analogue