Fix error spam when using PanoramaSky without texture
This commit is contained in:
parent
79a225ac2a
commit
7a1b7ddf6c
|
@ -2356,8 +2356,7 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
|
|||
|
||||
void RasterizerSceneGLES3::_draw_sky(RasterizerStorageGLES3::Sky *p_sky, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_custom_fov, float p_energy) {
|
||||
|
||||
if (!p_sky)
|
||||
return;
|
||||
ERR_FAIL_COND(!p_sky);
|
||||
|
||||
RasterizerStorageGLES3::Texture *tex = storage->texture_owner.getornull(p_sky->panorama);
|
||||
|
||||
|
@ -4337,6 +4336,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
|
|||
glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for sky, only diffuse/ambient matters
|
||||
*/
|
||||
|
||||
if (sky && sky->panorama.is_valid())
|
||||
_draw_sky(sky, p_cam_projection, p_cam_transform, false, env->sky_custom_fov, env->bg_energy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue