Browse Source

Missing proper comparison for depth pre-pass.

Juan Linietsky 5 years ago
parent
commit
fa548b052e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      servers/visual/rasterizer_rd/rasterizer_scene_forward_rd.cpp

+ 1 - 1
servers/visual/rasterizer_rd/rasterizer_scene_forward_rd.cpp

@@ -267,7 +267,7 @@ void RasterizerSceneForwardRD::ShaderData::set_code(const String &p_code) {
 
 	if (depth_test != DEPTH_TEST_DISABLED) {
 		depth_stencil_state.enable_depth_test = true;
-		depth_stencil_state.depth_compare_operator = RD::COMPARE_OP_LESS;
+		depth_stencil_state.depth_compare_operator = RD::COMPARE_OP_LESS_OR_EQUAL;
 		depth_stencil_state.enable_depth_write = depth_draw != DEPTH_DRAW_DISABLED ? true : false;
 	}