diff options
author | Bastiaan Olij <mux213@gmail.com> | 2018-05-27 19:53:10 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-27 19:53:10 +1000 |
commit | 6c649bd785b0901b0fcba37673f5256626d3f92d (patch) | |
tree | d2b7f6c61cf4b09d247c00c781d43ea75c96a94a | |
parent | 130fd6bcb88d7b297b13c3ed20a715b5ab9cce47 (diff) | |
parent | f4638d16f132c80a001cb79b30e16348fcaef8f6 (diff) |
Merge pull request #19029 from BastiaanOlij/more_viewport_texture_fixes
Fixed generating radiance texture when using viewport texture for sky
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 7 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 8da2c2f9c2..03ff84c093 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2363,10 +2363,9 @@ void RasterizerSceneGLES3::_draw_sky(RasterizerStorageGLES3::Sky *p_sky, const C ERR_FAIL_COND(!tex); glActiveTexture(GL_TEXTURE0); - if (tex->proxy && tex->proxy->tex_id) - glBindTexture(tex->target, tex->proxy->tex_id); - else - glBindTexture(tex->target, tex->tex_id); + tex = tex->get_ptr(); //resolve for proxies + + glBindTexture(tex->target, tex->tex_id); if (storage->config.srgb_decode_supported && tex->srgb && !tex->using_srgb) { diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 85ae69f8b8..11ab957458 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -1356,6 +1356,8 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra ERR_FAIL_COND(!texture); } + texture = texture->get_ptr(); //resolve for proxies + glBindVertexArray(0); glDisable(GL_CULL_FACE); glDisable(GL_DEPTH_TEST); @@ -5895,12 +5897,9 @@ void RasterizerStorageGLES3::update_particles() { tex = resources.white_tex; } break; } - } else if (t->proxy && t->proxy->tex_id) { - - target = t->proxy->target; - tex = t->proxy->tex_id; } else { + t = t->get_ptr(); //resolve for proxies target = t->target; tex = t->tex_id; } |