BugFix FrameBuffer alpha (disabled for SessionSource and RenderSource)

and bugfix RenderPreview UV coordinates.
This commit is contained in:
brunoherbelin
2020-05-22 23:08:09 +02:00
parent 9f4cb4dce3
commit ecbca0b5e6
8 changed files with 29 additions and 19 deletions

View File

@@ -202,12 +202,11 @@ void RenderView::setResolution(glm::vec3 resolution)
delete frame_buffer_;
frame_buffer_ = new FrameBuffer(resolution);
frame_buffer_->setClearColor(glm::vec4(0.f, 0.f, 0.f, 1.f));
}
void RenderView::draw()
{
static glm::mat4 projection = glm::ortho(-1.f, 1.f, -1.f, 1.f, -SCENE_DEPTH, 0.f);
static glm::mat4 projection = glm::ortho(-1.f, 1.f, -1.f, 1.f, -SCENE_DEPTH, 1.f);
glm::mat4 P = glm::scale( projection, glm::vec3(1.f / frame_buffer_->aspectRatio(), 1.f, 1.f));
frame_buffer_->begin();
scene.root()->draw(glm::identity<glm::mat4>(), P);