1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #111260 from devloglogan/compat-motion-vec-fix

Add null check when getting motion vector fbo
This commit is contained in:
Thaddeus Crews
2025-10-06 09:06:30 -05:00

View File

@@ -2495,7 +2495,7 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
scene_state.reset_gl_state(); scene_state.reset_gl_state();
GLuint motion_vectors_fbo = rt->overridden.velocity_fbo; GLuint motion_vectors_fbo = rt ? rt->overridden.velocity_fbo : 0;
if (motion_vectors_fbo != 0 && GLES3::Config::get_singleton()->max_vertex_attribs >= 22) { if (motion_vectors_fbo != 0 && GLES3::Config::get_singleton()->max_vertex_attribs >= 22) {
RENDER_TIMESTAMP("Motion Vectors Pass"); RENDER_TIMESTAMP("Motion Vectors Pass");
glBindFramebuffer(GL_FRAMEBUFFER, motion_vectors_fbo); glBindFramebuffer(GL_FRAMEBUFFER, motion_vectors_fbo);