diff --git a/dpl3-revive/patha/vrview_gl.py b/dpl3-revive/patha/vrview_gl.py index 5120365..23372a6 100644 --- a/dpl3-revive/patha/vrview_gl.py +++ b/dpl3-revive/patha/vrview_gl.py @@ -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 diff --git a/emulator/render-bridge/launch_pod.ps1 b/emulator/render-bridge/launch_pod.ps1 index df5ad9f..961f35c 100644 --- a/emulator/render-bridge/launch_pod.ps1 +++ b/emulator/render-bridge/launch_pod.ps1 @@ -16,8 +16,13 @@ param( [string]$BridgePos = '2020,20', # Division head slot (explode layout) [switch]$NoBridge, [switch]$NoSound, - [switch]$ShowNative # also show the native Division window + [switch]$ShowNative, # also show the native Division window # (wire-decode diagnostic; black clear) + [switch]$Mipmap # VRVIEW_MIPMAP=1: mip-filter minified + # textures (kills RP's checkerboard-floor + # shimmer). Non-authentic (board had no + # mipmaps); set at BOOT so no mid-mission + # bridge restart churns the RIO. ) $ErrorActionPreference = 'Stop' New-Item -ItemType Directory -Force $Work | Out-Null @@ -77,6 +82,8 @@ if (-not $NoBridge) { # park the bridge window on the Division head slot (SDL honors this at # window creation) $env:SDL_VIDEO_WINDOW_POS = $BridgePos + if ($Mipmap) { $env:VRVIEW_MIPMAP = '1' } + else { Remove-Item Env:VRVIEW_MIPMAP -ErrorAction SilentlyContinue } # bridge rides the socket tee (retries until the device listens); the # fifodump path is its catch-up source if it ever (re)starts mid-mission. # Launch with pyw (windowless pythonw), NOT py: py opens a console window