Renderer: vendor live-bridge scripts; GPU backend unblocked (60fps)
- emulator/render-bridge/: the pod->Dave's-renderer live bridge (rescued from session scratchpad): live_bridge.py (first-person cam from the 0x1f pose, arrow-key eye-height trim), fp/chase offline renders, fifobridge, diagnostics, gauge_arena[_sound].conf, and launch_pod.ps1 (one-command pod+bridge restart: pentapus VPX_EXPLODE + AWE32 sound + GL bridge). - _backend.py: renderer selection -- vrview_gl.GLRenderer (moderngl) by default, VRVIEW_SOFT=1 for the software reference; backend-agnostic frame save via last_frame. - GPU backend runs on side-by-side CPython 3.13 (moderngl/glcontext cp313 wheels; no MSVC needed): 63fps headless / 60.7 windowed vs 21fps software on the same scene, and the GL path also draws the vertex-alpha cloud dome. - vrview.py: VRVIEW_GAMMA env selects DAC gamma (1.25 live-renderer legacy vs 1.7 per the original GAMMA.C) for A/B against the real pod. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -430,6 +430,10 @@ class Renderer:
|
||||
self._last_ms = 0.0
|
||||
self._psys = {} # SPECIALFX particle pools by code
|
||||
self.light = np.array([0.3, 0.8, 0.5]); self.light /= np.linalg.norm(self.light)
|
||||
# Division 10-bit-DAC output gamma. GAMMA.C (the original source) builds
|
||||
# out = (i/255)^(1/1.7); this live renderer historically used 1.25.
|
||||
# VRVIEW_GAMMA selects it so the two can be compared against the real pod.
|
||||
self.gamma = float(os.environ.get('VRVIEW_GAMMA', '1.25'))
|
||||
|
||||
def dcs_matrix(self, board, h):
|
||||
m = None
|
||||
@@ -752,8 +756,9 @@ class Renderer:
|
||||
self.skip / 60.0)
|
||||
|
||||
arr = np.clip(img, 0, 255).astype(np.uint8)
|
||||
# Division DAC gamma (out = in^(1/1.25)) -- match render_preview.py
|
||||
arr = (np.power(arr / 255.0, 1 / 1.25) * 255).astype(np.uint8)
|
||||
# Division DAC output gamma (VRVIEW_GAMMA; GAMMA.C = 1.7, live-renderer
|
||||
# legacy = 1.25)
|
||||
arr = (np.power(arr / 255.0, 1.0 / self.gamma) * 255).astype(np.uint8)
|
||||
surf = pg.surfarray.make_surface(np.transpose(arr, (1, 0, 2)))
|
||||
self.screen.blit(surf, (0, 0))
|
||||
pg.display.flip()
|
||||
|
||||
Reference in New Issue
Block a user