https://bugs.winehq.org/show_bug.cgi?id=43932
Bug ID: 43932 Summary: Fallout 4 (Steam): Low detailed LOD exterior Meshes are rendered Inside interior cell Product: Wine Version: 2.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: winehq@spam.b2ag.de Distribution: ---
There is a bug where in Fallout 4 low detailed LOD exterior meshes are rendered inside interior cell. Screenshots of user "me." from inside the Museum in Concord: https://imgur.com/a/v91oI
If one toggles clipping and views it from outside, than it seems there is some artificial border which could well define which parts shouldn't get rendered. I highlighted the border in the following screenshot. https://imgur.com/a/0xXhu It looks like a real sharp shadow. Ground texture is the same on both sides of the border, only lighting differs hugely. Maybe we are lacking some vertex clipping of any form here.
One workaround is to disable LOD when inside of building by using "tll" (ToggleLODLand) console command. It will also disable distant LOD meshes outside of buildings. One needs to toggle it whenever entering or leaving interior cells, which makes it a quite annoying workaround.
I was using Arch Linux Wine 2.18-staging with dsound-sleep-patch and AMD R9 280X GPU with Mesa 17.2 at time of writing.
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #1 from Thomas winehq@spam.b2ag.de --- According to a thread in nexusmods forums, a "clip volume" should exist to prevent those odd visual effects.
"If your cell is supposed to be at or near ground level, the generated LOD will force its way into your interior cell. You need to create an LODClipVolume around your cell to prevent that." ( quote from user RedRocketTV )
https://forums.nexusmods.com/index.php?/topic/5697282-how-to-change-offset-o...
So question is, why isn't that "LODClipVolume" applied properly to the low LOD meshes? And how can one debug such rendering issue?
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #2 from Thomas winehq@spam.b2ag.de --- I've managed to get Fallout 4 editor "Creation Kit" running and made a screenshot of the "LODClipVolume" (I've colored it purple) for the Museum at Concord. https://i.imgur.com/VmdedC0.jpg
When comparing following screenshots, it looks like the dark area was meant to be clipped. Third screenshot raises some doubts though. https://i.imgur.com/p1i0QDb.jpg https://i.imgur.com/vK79WeE.png https://i.imgur.com/4zIzN79.png
I could reproduce the second screenshot of user "me." inside the editor. https://imgur.com/a/v91oI https://i.imgur.com/T6d076d.png
It still looks like the "LODClipVolume", which always seems to be an ellipsoid, isn't properly used to clip the "Landscape LOD" in wine.
https://bugs.winehq.org/show_bug.cgi?id=43932
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia@gmail.com
--- Comment #3 from Józef Kucia joseph.kucia@gmail.com --- Please attach terminal output. Maybe there's something obvious in the log.
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #4 from Thomas winehq@spam.b2ag.de --- Created attachment 59616 --> https://bugs.winehq.org/attachment.cgi?id=59616 Console output after filtering with "sort -u"
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #5 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Thomas from comment #4)
fixme:d3d_shader:shader_glsl_setup_sm3_rasterizer_input Unhandled sysval semantic 0x2.
Possibly this one is the cause of the issue, 0x2 is SV_CullDistance.
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #6 from Józef Kucia joseph.kucia@gmail.com --- Created attachment 59617 --> https://bugs.winehq.org/attachment.cgi?id=59617 Patch
Please try if the attached patch helps.
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #7 from Józef Kucia joseph.kucia@gmail.com --- Actually, no, the patch won't help. 0x2 is SV_ClipDistance and 0x3 is SV_CullDistance
https://bugs.winehq.org/show_bug.cgi?id=43932
Thomas winehq@spam.b2ag.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Fallout 4 (Steam): Low |Fallout 4 (Steam): Low |detailed LOD exterior |detailed LOD exterior |Meshes are rendered Inside |Meshes are rendered Inside |interior cell |interior cell (missing | |Clipping)
https://bugs.winehq.org/show_bug.cgi?id=43932
Thomas winehq@spam.b2ag.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |directx-d3d
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #8 from Thomas winehq@spam.b2ag.de --- I can confirm "fixme:d3d_shader:shader_glsl_setup_sm3_rasterizer_input Unhandled sysval semantic 0x2" does not seem to occur outside of buildings.
https://bugs.winehq.org/show_bug.cgi?id=43932
Thomas winehq@spam.b2ag.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Fallout 4 (Steam): Low |Fallout 4 (Steam): Low |detailed LOD exterior |detailed LOD exterior |Meshes are rendered Inside |Meshes are rendered Inside |interior cell (missing |interior cell (wine missing |Clipping) |support for | |SV_ClipDistanceN)
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #9 from Thomas winehq@spam.b2ag.de --- Created attachment 59626 --> https://bugs.winehq.org/attachment.cgi?id=59626 PoC WINED3D_SV_CLIP_DISTANCE Implementation
Works for me by implementing WINED3D_SV_CLIP_DISTANCE. I know nothing about OpenGL, DirectX and even less about how it's brought together in wine, so pretty please someone do this right (add tests, think about side effects and I guess move glenable?). At least for me my patch makes the bug go away as seen in following screenshots.
https://i.imgur.com/3cSNiKS.jpg https://i.imgur.com/4nSz93E.jpg
https://bugs.winehq.org/show_bug.cgi?id=43932
winebugs@greyoak.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winebugs@greyoak.com
--- Comment #10 from winebugs@greyoak.com --- Confirmed that the PoC WINED3D_SV_CLIP_DISTANCE patch works and I haven't noticed any side-effects.
https://bugs.winehq.org/show_bug.cgi?id=43932
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=43932
Nickolay Mardanov soniczerops@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |soniczerops@gmail.com
--- Comment #11 from Nickolay Mardanov soniczerops@gmail.com --- Can confirm that PoC WINED3D_SV_CLIP_DISTANCE solves this for me.
I've hacked together a PKGBUILD to build wine-staging with this patch if anyone else is willing to test it.
https://aur.archlinux.org/packages/wine-staging-fallout4-git/
https://bugs.winehq.org/show_bug.cgi?id=43932
Mathieu Comandon strider@strycore.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |strider@strycore.com
https://bugs.winehq.org/show_bug.cgi?id=43932
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #59617|0 |1 is obsolete| |
https://bugs.winehq.org/show_bug.cgi?id=43932
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |431aa3274ca322e143c3dbc856a | |e1ac894f5d15e Resolution|--- |FIXED
--- Comment #12 from Józef Kucia joseph.kucia@gmail.com --- Clip distances are implemented now: https://source.winehq.org/git/wine.git/?a=commit;h=431aa3274ca322e143c3dbc85...
https://bugs.winehq.org/show_bug.cgi?id=43932
--- Comment #13 from Thomas winehq@spam.b2ag.de --- Thank you, good sir!
https://bugs.winehq.org/show_bug.cgi?id=43932
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.0-rc1.