Feature/screenspace renderables (#830)

* Add ability to position screen space renderables in 3D
  * Independent face camera setting
  * More intuitive local rotation
  * Cleanup
  * Introduce global and master rotation. Remove DisableSceneOnMaster. Revisit screenspace renderables.
This commit is contained in:
Emil Axelsson
2019-04-24 13:34:01 +02:00
committed by Alexander Bock
parent 0dcf65ce4f
commit e78121febc
13 changed files with 417 additions and 212 deletions

View File

@@ -134,13 +134,14 @@ void ScreenSpaceFramebuffer::render() {
static_cast<GLsizei>(resolution.y)
);
const glm::mat4 rotation = rotationMatrix();
const glm::mat4 globalRotation = globalRotationMatrix();
const glm::mat4 translation = translationMatrix();
const glm::mat4 localRotation = localRotationMatrix();
const glm::mat4 scale = glm::scale(
scaleMatrix(),
glm::vec3((1.f / xratio), (1.f / yratio), 1.f)
);
const glm::mat4 modelTransform = rotation*translation*scale;
const glm::mat4 modelTransform = globalRotation*translation*localRotation*scale;
draw(modelTransform);
}
}