Fix binding of ViewportTexture to Sky

In order to the get the actual rendered image from a ViewportTexture the sky needs to access the proxy texture.
This commit is contained in:
ShyRed 2018-04-12 22:51:35 +02:00
parent 3a5b25d5b4
commit deca3f18b7

View file

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