Skip to content

Changelog: v2.7.0 ​

Breaking: glm::vec4 orientations are (w, x, y, z) ​

rayrai's glm::vec4 quaternions hold (w, x, y, z) in the vector's x, y, z, w components, as the headers always documented. The setters used to read the vector as (x, y, z, w) instead. That meant:

  • getOrientation() did not return what was set;
  • the documented identity glm::vec4(1, 0, 0, 0) turned objects 180° about x;
  • the vector and scalar setOrientation overloads disagreed.

These now all use (w, x, y, z):

  • Visuals::setOrientation(const glm::vec4&);
  • InstancedVisuals::addInstance(position, orientation, ...);
  • InstancedVisuals::InstanceSpec::orientation (default (1, 0, 0, 0));
  • InstancedVisuals::setOrientation(id, orientation);
  • tcp_viewer::ClientRequest::quat (default (1, 0, 0, 0)).

Code that passed (x, y, z, w) to work around the old behaviour must switch. The old identity {0, 0, 0, 1} is now a 180° turn about z.

The same fix applies to the TCP viewer:

  • body frames of rotated bodies point the right way;
  • Set GC no longer reorders a floating base's quaternion components, which used to turn an upright robot upside down.

Rendering ​

Fixes ​

  • Screen-space AO flicker. AO is now deterministic at sky silhouettes. Its screen-space derivatives were evaluated only on geometry pixels, which is undefined in a 2x2 quad that straddles the sky, and made AO flicker on Apple GPUs.
  • Texture-unit rebinding. On GPUs with 16 or 32 fragment texture units, Material::applyTo no longer binds one texture unit twice when maps are relocated.
  • Bound pixel-unpack buffers. Lazily uploaded cloud-noise and fallback textures no longer fail when the application leaves a GL_PIXEL_UNPACK_BUFFER bound.
  • Instanced shaders on macOS. Instanced shaders no longer fetch vertex colour and tangent attributes that the specialized foliage variants do not use. Apple's compiler keeps unused vertex outputs.
  • CoACD example startup. rayrai_coacd_mesh_approximation builds its collision parts before opening the window, and reports that a cold cache can take minutes.

RaiSim — physics for robotics and AI.