Merge pull request #18159 from ShyRed/viewportsky

Fix binding of ViewportTexture to Sky
This commit is contained in:
Juan Linietsky 2018-05-07 15:34:13 -03:00 committed by GitHub
commit f1d2b0ebf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -2362,7 +2362,11 @@ void RasterizerSceneGLES3::_draw_sky(RasterizerStorageGLES3::Sky *p_sky, const C
ERR_FAIL_COND(!tex);
glActiveTexture(GL_TEXTURE0);
glBindTexture(tex->target, tex->tex_id);
if (tex->proxy && tex->proxy->tex_id)
glBindTexture(tex->target, tex->proxy->tex_id);
else
glBindTexture(tex->target, tex->tex_id);
if (storage->config.srgb_decode_supported && tex->srgb && !tex->using_srgb) {