Don't post process on tiny render targets, fixes #19628

(cherry picked from commit a78b42c058)
This commit is contained in:
Juan Linietsky 2018-11-19 22:05:55 -03:00 committed by Rémi Verschelde
parent b1bb7e48ca
commit 16e6d6fede
1 changed files with 1 additions and 1 deletions

View File

@ -3554,7 +3554,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
}
if (!env || storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
if (!env || storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT] || storage->frame.current_rt->width < 4 || storage->frame.current_rt->height < 4) { //no post process on small render targets
//no environment or transparent render, simply return and convert to SRGB
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
glActiveTexture(GL_TEXTURE0);