много исправлений
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user