Fix #130714: Overlay Next: Can't Select Meshes with X-ray On
Xray mode also need to draw the object surfaces. The only difference is that the depth test is disabled by `select_bind`. So the prepass do not write to depth and it is safe to enable.
This commit is contained in:
@@ -719,8 +719,9 @@ bool Instance::object_is_in_front(const Object *object, const State &state)
|
||||
bool Instance::object_needs_prepass(const ObjectRef &ob_ref, bool in_paint_mode)
|
||||
{
|
||||
if (selection_type_ != SelectionType::DISABLED) {
|
||||
/* Selection always need a prepass. Except if it is in xray mode. */
|
||||
return !state.xray_enabled;
|
||||
/* Selection always need a prepass.
|
||||
* Note that depth writing and depth test might be disable for certain selection mode. */
|
||||
return true;
|
||||
}
|
||||
|
||||
if (in_paint_mode) {
|
||||
|
||||
Reference in New Issue
Block a user