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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user