Revert "Fix #135848: Selection-Next: Backface culling"
This reverts commit44b64ca9df. The fix is broken by04a57dd937.
This commit is contained in:
@@ -93,7 +93,7 @@ class Prepass : Overlay {
|
||||
ps_.bind_ubo(OVERLAY_GLOBALS_SLOT, &res.globals_buf);
|
||||
ps_.state_set(DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | backface_cull_state,
|
||||
state.clipping_plane_count);
|
||||
res.select_bind(ps_, backface_cull_state);
|
||||
res.select_bind(ps_);
|
||||
{
|
||||
auto &sub = ps_.sub("Mesh");
|
||||
sub.shader_set(res.is_selection() ? res.shaders.depth_mesh_conservative.get() :
|
||||
|
||||
@@ -161,20 +161,20 @@ struct SelectMap {
|
||||
}
|
||||
|
||||
/** IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set. */
|
||||
void select_bind(PassSimple &pass, DRWState extend_selection_state = DRWState(0))
|
||||
void select_bind(PassSimple &pass)
|
||||
{
|
||||
if (selection_type == SelectionType::DISABLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* TODO: clipping state. */
|
||||
pass.state_set(DRW_STATE_WRITE_COLOR | extend_selection_state);
|
||||
pass.state_set(DRW_STATE_WRITE_COLOR);
|
||||
pass.bind_ubo(SELECT_DATA, &info_buf);
|
||||
pass.bind_ssbo(SELECT_ID_OUT, &select_output_buf);
|
||||
}
|
||||
|
||||
/** IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set. */
|
||||
void select_bind(PassMain &pass, DRWState extend_selection_state = DRWState(0))
|
||||
void select_bind(PassMain &pass)
|
||||
{
|
||||
if (selection_type == SelectionType::DISABLED) {
|
||||
return;
|
||||
@@ -182,7 +182,7 @@ struct SelectMap {
|
||||
|
||||
pass.use_custom_ids = true;
|
||||
/* TODO: clipping state. */
|
||||
pass.state_set(DRW_STATE_WRITE_COLOR | extend_selection_state);
|
||||
pass.state_set(DRW_STATE_WRITE_COLOR);
|
||||
pass.bind_ubo(SELECT_DATA, &info_buf);
|
||||
/* IMPORTANT: This binds a dummy buffer `in_select_buf` but it is not supposed to be used. */
|
||||
pass.bind_ssbo(SELECT_ID_IN, &dummy_select_buf);
|
||||
@@ -191,9 +191,7 @@ struct SelectMap {
|
||||
|
||||
/* TODO: Deduplicate. */
|
||||
/** IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set. */
|
||||
void select_bind(PassMain &pass,
|
||||
PassMain::Sub &sub,
|
||||
DRWState extend_selection_state = DRWState(0))
|
||||
void select_bind(PassMain &pass, PassMain::Sub &sub)
|
||||
{
|
||||
if (selection_type == SelectionType::DISABLED) {
|
||||
return;
|
||||
@@ -201,7 +199,7 @@ struct SelectMap {
|
||||
|
||||
pass.use_custom_ids = true;
|
||||
/* TODO: clipping state. */
|
||||
sub.state_set(DRW_STATE_WRITE_COLOR | extend_selection_state);
|
||||
sub.state_set(DRW_STATE_WRITE_COLOR);
|
||||
sub.bind_ubo(SELECT_DATA, &info_buf);
|
||||
/* IMPORTANT: This binds a dummy buffer `in_select_buf` but it is not supposed to be used. */
|
||||
sub.bind_ssbo(SELECT_ID_IN, &dummy_select_buf);
|
||||
|
||||
Reference in New Issue
Block a user