Fix #132056, #132057, #132666: Overlay-Next: X-Ray

Take xray_enabled into account for prepasses.
Fix #132056
Fix #132057
Fix #132666
This commit is contained in:
Miguel Pozo
2025-01-13 17:47:35 +01:00
parent d51282d732
commit 2abc3ad801
2 changed files with 2 additions and 2 deletions

View File

@@ -290,7 +290,7 @@ class Meshes : Overlay {
/* WORKAROUND: GPU subdiv uses a different normal format. Remove this once GPU subdiv is
* refactored. */
const bool use_gpu_subdiv = BKE_subsurf_modifier_has_gpu_subdiv(static_cast<Mesh *>(ob->data));
const bool draw_as_solid = (ob->dt > OB_WIRE);
const bool draw_as_solid = (ob->dt > OB_WIRE) && !state.xray_enabled;
if (show_retopology_) {
gpu::Batch *geom = DRW_mesh_batch_cache_get_edit_triangles(mesh);

View File

@@ -72,7 +72,7 @@ class Prepass : Overlay {
public:
void begin_sync(Resources &res, const State &state) final
{
enabled_ = state.is_space_v3d();
enabled_ = state.is_space_v3d() && !state.xray_enabled;
if (!enabled_) {
/* Not used. But release the data. */