Reset texture flags after radiance map generation
This commit is contained in:
parent
df87601c88
commit
193b0bf1e3
2 changed files with 6 additions and 0 deletions
|
@ -1317,6 +1317,9 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
|
||||||
|
//reset flags on Sky Texture that may have changed
|
||||||
|
texture_set_flags(sky->panorama, texture->flags);
|
||||||
|
|
||||||
// Framebuffer did its job. thank mr framebuffer
|
// Framebuffer did its job. thank mr framebuffer
|
||||||
glActiveTexture(GL_TEXTURE0); //back to panorama
|
glActiveTexture(GL_TEXTURE0); //back to panorama
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
|
glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
|
||||||
|
|
|
@ -2189,6 +2189,9 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
|
|
||||||
|
//reset flags on Sky Texture that may have changed
|
||||||
|
texture_set_flags(sky->panorama, texture->flags);
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES3::system_fbo);
|
glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES3::system_fbo);
|
||||||
glDeleteFramebuffers(1, &tmp_fb);
|
glDeleteFramebuffers(1, &tmp_fb);
|
||||||
glDeleteFramebuffers(1, &tmp_fb2);
|
glDeleteFramebuffers(1, &tmp_fb2);
|
||||||
|
|
Loading…
Reference in a new issue