Renderer: VRVIEW_NEARCULL toggle for the near-eye cull A/B
The first-person canopy cull can now be disabled (VRVIEW_NEARCULL=0) to study the always-armed cockpit/bay assembly from the true chain eye -- part of the pilot-view attachment investigation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,13 @@ def inst_visible(nodes, inst):
|
||||
return len(b) >= 20 and struct.unpack_from('<I', b, 16)[0] != 0
|
||||
|
||||
|
||||
# First-person near-eye cull (the cockpit-canopy "vertical line" fix).
|
||||
# VRVIEW_NEARCULL=0 disables it: with the camera at the true chain eye the
|
||||
# always-armed cockpit/bay assembly should render as the authentic canopy
|
||||
# surround instead of a stray sliver -- A/B toggle for that investigation.
|
||||
NEARCULL = os.environ.get('VRVIEW_NEARCULL', '1') != '0'
|
||||
|
||||
|
||||
# NOTE: vrboard.do_flush stores the flush payload MINUS the leading remote word,
|
||||
# so stored-body word k = wire-payload word k+1. Offsets below are stored-body.
|
||||
def _mat_from_dcs(body):
|
||||
@@ -845,7 +852,7 @@ class Renderer:
|
||||
# NOVIEWMATRIX instances live in camera space: no view transform
|
||||
M = Mw if inst.get('hud') else Mw @ V
|
||||
# first-person canopy cull (see SceneCache radius note)
|
||||
if (inst.get('gated') and not inst.get('hud')
|
||||
if (NEARCULL and inst.get('gated') and not inst.get('hud')
|
||||
and np.linalg.norm(M[3, :3]) + inst.get('radius', 0) < 10.0):
|
||||
continue
|
||||
if inst['chain'] and inst['chain'][0] in board.anim:
|
||||
|
||||
@@ -470,7 +470,7 @@ class GLRenderer(vrview.Renderer):
|
||||
Mw = self.chain_matrix(board, inst['chain'], fix_degenerate=True)
|
||||
M = Mw if inst.get('hud') else Mw @ V
|
||||
# first-person canopy cull (see SceneCache radius note in vrview)
|
||||
if (inst.get('gated') and not inst.get('hud')
|
||||
if (vrview.NEARCULL and inst.get('gated') and not inst.get('hud')
|
||||
and np.linalg.norm(M[3, :3]) + inst.get('radius', 0) < 10.0):
|
||||
continue
|
||||
if inst['chain'] and inst['chain'][0] in board.anim:
|
||||
|
||||
Reference in New Issue
Block a user