Fixed handling of depth texture so it's resolved and bound when needed

- Cleaned up and improved the code determining when we need to use a depth
  prepass (previously it wasn't executed in certain cases even if it was
  needed)
- Added code to prepare and bind the depth texture even when no depth prepass
  or MRTs (more precisely effect buffers) are used

Fixes #25870, #25535, and #25387.
This commit is contained in:
Daniel Rakos
2019-03-22 11:09:23 +01:00
parent 81292665d5
commit 849596c40c
4 changed files with 74 additions and 27 deletions
+3 -3
View File
@@ -8042,8 +8042,8 @@ void RasterizerStorageGLES3::initialize() {
String renderer = (const char *)glGetString(GL_RENDERER);
config.no_depth_prepass = !bool(GLOBAL_GET("rendering/quality/depth_prepass/enable"));
if (!config.no_depth_prepass) {
config.use_depth_prepass = bool(GLOBAL_GET("rendering/quality/depth_prepass/enable"));
if (config.use_depth_prepass) {
String vendors = GLOBAL_GET("rendering/quality/depth_prepass/disable_for_vendors");
Vector<String> vendor_match = vendors.split(",");
@@ -8053,7 +8053,7 @@ void RasterizerStorageGLES3::initialize() {
continue;
if (renderer.findn(v) != -1) {
config.no_depth_prepass = true;
config.use_depth_prepass = false;
}
}
}