много исправлений

This commit is contained in:
Бычков Андрей
2022-10-13 17:00:24 +03:00
parent ce3df7d051
commit 6150882794
17 changed files with 142 additions and 145 deletions

View File

@@ -291,8 +291,9 @@ void Renderer::renderScene() {
/// lights
cur_lights = scene.lights_used;
bool use_camlight = (camera_light_mode == QGLView::clmOn);
if ((camera_light_mode == QGLView::clmAuto) && cur_lights.isEmpty())
if ((camera_light_mode == QGLView::clmAuto) && cur_lights.isEmpty()) {
use_camlight = true;
}
if (use_camlight) {
cur_lights[Light::Omni] << cam_light;
cam_light->setPos(cam->pos());
@@ -346,16 +347,16 @@ void Renderer::renderScene() {
}
/// tonemapping
if (tone_proc.process())
fbo_out.bind();
if (tone_proc.process()) fbo_out.bind();
if (bindShader(srTonemapPass, &prog)) {
prog->setUniformValue("gamma", gamma_);
prog->setUniformValue("frame_max", tone_proc.frameMax());
fbo_out.bindColorTexture(obrSum, 0);
fbo_out.setWriteBuffer(obrTonemap);
renderQuad(prog, quad);
} else
} else {
fbo_out.blit(obrSum, fbo_out.id(), obrTonemap, fbo_out.rect(), fbo_out.rect());
}
//glClearFramebuffer(Qt::red, false);
fbo_out.release();