Bridge: VRVIEW_MIPMAP option + launch_pod -Mipmap flag (RP checkerboard shimmer)

RP's high-frequency checkerboard track floor aliases/moires without mipmaps
(reads as "flashing geometry" in motion; user's texture-interpolation call).
vrview_gl _tex() now builds mipmaps + trilinear/anisotropic filtering under
VRVIEW_MIPMAP=1 (keeps point-sample look up close; off by default = authentic
i860, BT-identical). launch_pod.ps1 gains -Mipmap so it's set at BOOT -- never
restart the bridge mid-mission (GL-context churn starves the RIO ACK deadline).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-09 15:04:35 -05:00
co-authored by Claude Fable 5
parent 68ca9b6f15
commit e1b43fb6d5
2 changed files with 26 additions and 4 deletions
+18 -3
View File
@@ -343,10 +343,25 @@ class GLRenderer(vrview.Renderer):
# AS860/SCANLINE.SS) does ONE fld.l per pixel from the interpolated
# u,v -- no bilinear fetch existed on the board. VRVIEW_FILTER=linear
# opts into smoothing for modern taste.
if os.environ.get('VRVIEW_FILTER') == 'linear':
tex.filter = (self.moderngl.LINEAR, self.moderngl.LINEAR)
mag = (self.moderngl.LINEAR if os.environ.get('VRVIEW_FILTER') == 'linear'
else self.moderngl.NEAREST)
# VRVIEW_MIPMAP=1: keep the point-sampled look up close but add mipmaps
# so MINIFIED high-frequency textures (RP's checkerboard track floor)
# stop aliasing/moireing -- that shimmer-in-motion reads as "flashing
# geometry". The board had no mipmaps (so this is NON-authentic), but
# RP's decal-frequency floor needs it to be watchable. Off by default.
if os.environ.get('VRVIEW_MIPMAP', '0') != '0':
tex.build_mipmaps()
mip = (self.moderngl.LINEAR_MIPMAP_LINEAR
if os.environ.get('VRVIEW_FILTER') == 'linear'
else self.moderngl.NEAREST_MIPMAP_LINEAR)
tex.filter = (mip, mag)
try:
tex.anisotropy = float(os.environ.get('VRVIEW_ANISO', '8'))
except Exception:
pass
else:
tex.filter = (self.moderngl.NEAREST, self.moderngl.NEAREST)
tex.filter = (mag, mag)
tex.repeat_x = tex.repeat_y = True
self._texcache[id(rgb)] = {'arr': rgb, 'tex': tex}
return tex