You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Use GL_COLOR_ATTACHMENT in depth prepass when using Multiview.
I am certain this is a driver bug. But on some devices when no draw buffer is specified, the depth operations fail when there is no color buffer.
This commit is contained in:
@@ -2499,7 +2499,9 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
|
|||||||
glColorMask(0, 0, 0, 0);
|
glColorMask(0, 0, 0, 0);
|
||||||
RasterizerGLES3::clear_depth(0.0);
|
RasterizerGLES3::clear_depth(0.0);
|
||||||
glClear(GL_DEPTH_BUFFER_BIT);
|
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 |
|
uint64_t spec_constant = SceneShaderGLES3::DISABLE_FOG | SceneShaderGLES3::DISABLE_LIGHT_DIRECTIONAL |
|
||||||
SceneShaderGLES3::DISABLE_LIGHTMAP | SceneShaderGLES3::DISABLE_LIGHT_OMNI |
|
SceneShaderGLES3::DISABLE_LIGHTMAP | SceneShaderGLES3::DISABLE_LIGHT_OMNI |
|
||||||
|
|||||||
Reference in New Issue
Block a user