Merge pull request #94095 from clayjohn/GLES3-drawbuffers
Use `GL_COLOR_ATTACHMENT` in depth prepass when using Multiview.
This commit is contained in:
commit
c10fde6137
|
@ -2499,7 +2499,9 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
|
|||
glColorMask(0, 0, 0, 0);
|
||||
RasterizerGLES3::clear_depth(0.0);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glDrawBuffers(0, nullptr);
|
||||
// Some desktop GL implementations fall apart when using Multiview with GL_NONE.
|
||||
GLuint db = p_camera_data->view_count > 1 ? GL_COLOR_ATTACHMENT0 : GL_NONE;
|
||||
glDrawBuffers(1, &db);
|
||||
|
||||
uint64_t spec_constant = SceneShaderGLES3::DISABLE_FOG | SceneShaderGLES3::DISABLE_LIGHT_DIRECTIONAL |
|
||||
SceneShaderGLES3::DISABLE_LIGHTMAP | SceneShaderGLES3::DISABLE_LIGHT_OMNI |
|
||||
|
|
Loading…
Reference in New Issue