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
|
# AS860/SCANLINE.SS) does ONE fld.l per pixel from the interpolated
|
||||||
# u,v -- no bilinear fetch existed on the board. VRVIEW_FILTER=linear
|
# u,v -- no bilinear fetch existed on the board. VRVIEW_FILTER=linear
|
||||||
# opts into smoothing for modern taste.
|
# opts into smoothing for modern taste.
|
||||||
if os.environ.get('VRVIEW_FILTER') == 'linear':
|
mag = (self.moderngl.LINEAR if os.environ.get('VRVIEW_FILTER') == 'linear'
|
||||||
tex.filter = (self.moderngl.LINEAR, self.moderngl.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:
|
else:
|
||||||
tex.filter = (self.moderngl.NEAREST, self.moderngl.NEAREST)
|
tex.filter = (mag, mag)
|
||||||
tex.repeat_x = tex.repeat_y = True
|
tex.repeat_x = tex.repeat_y = True
|
||||||
self._texcache[id(rgb)] = {'arr': rgb, 'tex': tex}
|
self._texcache[id(rgb)] = {'arr': rgb, 'tex': tex}
|
||||||
return tex
|
return tex
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ param(
|
|||||||
[string]$BridgePos = '2020,20', # Division head slot (explode layout)
|
[string]$BridgePos = '2020,20', # Division head slot (explode layout)
|
||||||
[switch]$NoBridge,
|
[switch]$NoBridge,
|
||||||
[switch]$NoSound,
|
[switch]$NoSound,
|
||||||
[switch]$ShowNative # also show the native Division window
|
[switch]$ShowNative, # also show the native Division window
|
||||||
# (wire-decode diagnostic; black clear)
|
# (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'
|
$ErrorActionPreference = 'Stop'
|
||||||
New-Item -ItemType Directory -Force $Work | Out-Null
|
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
|
# park the bridge window on the Division head slot (SDL honors this at
|
||||||
# window creation)
|
# window creation)
|
||||||
$env:SDL_VIDEO_WINDOW_POS = $BridgePos
|
$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
|
# 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.
|
# 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
|
# Launch with pyw (windowless pythonw), NOT py: py opens a console window
|
||||||
|
|||||||
Reference in New Issue
Block a user