http://bugs.winehq.org/show_bug.cgi?id=33761
Bug #: 33761 Summary: Touhou 10 and up have aliased dialogue text Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: murela_alba@abv.bg Classification: Unclassified
Created attachment 44710 --> http://bugs.winehq.org/attachment.cgi?id=44710 touhou 10 music room english
This happens in touhou 10, 11, 12, 12.5, 12.8 and 13. It affects only the main game font, used for the dialogue boxes, music room and some UI elements. The touhou 14 demo has a similar, but much more widespread aliasing issue (bug 33760). Here's a comparison from the Mountain of Faith music room on Windows 7 and in on Ubuntu 13.04 (64-bit) with wine 1.5.30.
http://bugs.winehq.org/show_bug.cgi?id=33761
murela_alba@abv.bg changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|x86 |x86-64
http://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #1 from murela_alba@abv.bg 2013-06-08 20:07:24 CDT --- Created attachment 44711 --> http://bugs.winehq.org/attachment.cgi?id=44711 terminal output wine 1.5
And here's the terminal output. I've noticed the "Unhandled filter 0x4" error doesn't appear until the problematic font is actually displayed.
http://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #2 from murela_alba@abv.bg 2013-06-08 20:10:40 CDT --- Created attachment 44712 --> http://bugs.winehq.org/attachment.cgi?id=44712 terminal output wine 1.4.1
Same thing happens in every wine version since at least 1.4.1, except that one gives a lot less warnings.
http://bugs.winehq.org/show_bug.cgi?id=33761
murela_alba@abv.bg changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-bugs@winehq.org Component|-unknown |directx-d3dx9
http://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #3 from murela_alba@abv.bg 2013-06-10 09:43:13 CDT --- Using native d3dx9_36 fixes it, just like bug 33760.
http://bugs.winehq.org/show_bug.cgi?id=33761
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #4 from joaopa jeremielapuree@yahoo.fr 2013-06-10 11:49:24 CDT --- Attach a console output with the latest wine (1.5.31) and d3dx debug channel enabled, ie cd in the repertory of the game and
WINEDEBUG=+d3dx wine foo.exe
http://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #5 from murela_alba@abv.bg 2013-06-10 13:32:49 CDT --- Created attachment 44739 --> http://bugs.winehq.org/attachment.cgi?id=44739 console output 1.5.31
Here you go. It overshoots the terminal character limit practically instantly, so I redirected the output to catch the beginning and got a 3MB plain text file in the 10 seconds it took to load up the game, go in the music room and exit. It mostly loops the same 40 or so lines infinitely, so I cut out a lot of the intermediate repeats to get into the size limit.
http://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #6 from murela_alba@abv.bg 2013-10-14 18:57:51 CDT --- Re-tested these with wine 1.7.4 and it seems to be solved for games 10, 12.5 and 12.8. 11, 12 and 13 seem to be unchanged.
https://bugs.winehq.org/show_bug.cgi?id=33761
tengukami pdfontaine@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pdfontaine@gmail.com
--- Comment #7 from tengukami pdfontaine@gmail.com --- Can confirm that dropping d3dx9_36 in the game directories of both 14 and 14.3 resolved this issue for me, running 1.6.2.
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #8 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.51 or newer) wine?
https://bugs.winehq.org/show_bug.cgi?id=33761
nospam@kota.moe changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nospam@kota.moe
--- Comment #9 from nospam@kota.moe --- Created attachment 55988 --> https://bugs.winehq.org/attachment.cgi?id=55988 Console output of touhou 13 with WINEDEBUG=+d3dx on 1.9.20
Can confirm this still happens with touhou 13 on 1.9.20. Log is attached.
Curiously, it also crashes right after entering the music room, though that's unrelated to this bug
(Ignore the LD_PRELOAD related lines - they're because of a 64-bit library I inject into every process, but touhou is 32 bit)
https://bugs.winehq.org/show_bug.cgi?id=33761
WhiteRiver_original yousei@unseen.is changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yousei@unseen.is
--- Comment #10 from WhiteRiver_original yousei@unseen.is --- Can confirm that this issue is still actual with Wine 3.16.
And it seems like that Wine 1.9.13 and 1.9.14 has a regression: even if native d3dx9_36 installed into wineprefix, aliasing is presents anyway. Thereby, with native d3dx9_36 and...
Wine 1.9.12: everything all right on all Touhou; Wine 1.9.13: aliasing appears only on Touhou 10, all subsequent works fine; Wine 1.9.14: aliasing appears on Touhou 10 and all subsequent too (Touhou 10, 11, 12, 12.5, 12.8, 13, 14, 14.3, 15, 16, 16.5). With all subsequent Wine up to 3.16: same as above.
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #11 from WhiteRiver_original yousei@unseen.is --- Created attachment 62407 --> https://bugs.winehq.org/attachment.cgi?id=62407 Console output of Touhou 10 MoF with wine 3.16 and native d3dx9_36, WINEDEBUG=+d3dx
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #12 from WhiteRiver_original yousei@unseen.is --- Created attachment 62409 --> https://bugs.winehq.org/attachment.cgi?id=62409 Comparsion of shoots in Touhou 12.5 with Wine 1.9.13 (left) and 1.9.14 (right)
Besides aliasing, this issue also affects the production of (in)correct coordinates on photographic shooters (Touhou 12.5 Double Spoiler and Touhou 16.5 Violet Detector).
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #13 from WhiteRiver_original yousei@unseen.is --- (Of course, previous comment illustrates behaviour with native d3dx9_36, just like #10. Without this library, coordinates are incorrect in all considered versions, same as aliasing.)
https://bugs.winehq.org/show_bug.cgi?id=33761
shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |shimon@postfixnotation.org
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #14 from shimon shimon@postfixnotation.org --- This issue also occurs in touhou 10 on Ubuntu 20.04 with Wine 5.17 (git commit hash: 01bacebba418bf6f58a644b1aab41be215bd200a).
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #15 from itoh shimon shimon@postfixnotation.org --- Created attachment 68164 --> https://bugs.winehq.org/attachment.cgi?id=68164 whiteout patch
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #16 from itoh shimon shimon@postfixnotation.org --- Created attachment 68165 --> https://bugs.winehq.org/attachment.cgi?id=68165 Touhou 10 with MS's d3xd9 dll (left, anti-aliased), Touhou 10 with Wine's d3xd9 dll (middle, aliased), and Touhou 10 with Wine's d3xd9 dll and whiteout patch (right, whiteout)
Implementing the processing of this filter (D3DX_FILTER_TRIANGLE) in D3DXLoadSurfaceFromMemory may solve this issue. This filter is for interpolation and is related to aliasing.
When I filled the destination buffer in white when this filter was specified in D3DXLoadSurfaceFromMemory, only the aliased text was filled in white.
Wine 5.17 (git commit hash: 01bacebba418bf6f58a644b1aab41be215bd200a)
https://bugs.winehq.org/show_bug.cgi?id=33761
itoh shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #68164|whiteout patch |whiteout patch (Wine 5.17 description| |(git commit hash: | |01bacebba418bf6f58a644b1aab | |41be215bd200a))
https://bugs.winehq.org/show_bug.cgi?id=33761
itoh shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #68164|whiteout patch (Wine 5.17 |whiteout patch (see #16 for description|(git commit hash: |details) (Wine 5.17 (git |01bacebba418bf6f58a644b1aab |commit hash: |41be215bd200a)) |01bacebba418bf6f58a644b1aab | |41be215bd200a))
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #17 from itoh shimon shimon@postfixnotation.org --- This issue also occurs in touhou 10 on Ubuntu 20.04 with latest Wine (git commit hash: 158a9e738421cd16f2e8296f11baa724c64c8ca7).
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #18 from itoh shimon shimon@postfixnotation.org --- Created attachment 69222 --> https://bugs.winehq.org/attachment.cgi?id=69222 bug-fixing patch for this issue
I make a bug-fixing patch, but I don't think this patch will be accepted. See readme-triangle-filter-resize-patch.md for usage. More details will be written at a later date.
https://bugs.winehq.org/show_bug.cgi?id=33761
itoh shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #69222|0 |1 is obsolete| |
--- Comment #19 from itoh shimon shimon@postfixnotation.org --- Created attachment 69223 --> https://bugs.winehq.org/attachment.cgi?id=69223 bug-fixing patch for this issue
Fixed patch. Wine version: git 158a9e738421cd16f2e8296f11baa724c64c8ca7
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #20 from itoh shimon shimon@postfixnotation.org --- Created attachment 69224 --> https://bugs.winehq.org/attachment.cgi?id=69224 Touhou 10 with the vanilla Wine (158a9e7) (left, jaggies), and Touhou 10 with the patched Wine (158a9e7) (right, anti-aliasing) | Patch: attachment 69223
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #21 from itoh shimon shimon@postfixnotation.org --- Created attachment 69225 --> https://bugs.winehq.org/attachment.cgi?id=69225 Touhou 10 with the vanilla Wine (158a9e7) (left, jaggies), and Touhou 10 with the patched Wine (158a9e7) (right, anti-aliasing) | Patch: attachment 69223 | Image 2
https://bugs.winehq.org/show_bug.cgi?id=33761
itoh shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #69225|0 |1 is obsolete| |
--- Comment #22 from itoh shimon shimon@postfixnotation.org --- Created attachment 69226 --> https://bugs.winehq.org/attachment.cgi?id=69226 69225: Touhou 10 with the vanilla Wine (158a9e7) (left, jaggies), and Touhou 10 with the patched Wine (158a9e7) (right, anti-aliasing) | Patch: attachment 69223 | Image 2
https://bugs.winehq.org/show_bug.cgi?id=33761
itoh shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #69226|69225: Touhou 10 with the |Touhou 10 with the vanilla description|vanilla Wine (158a9e7) |Wine (158a9e7) (left, |(left, jaggies), and Touhou |jaggies), and Touhou 10 |10 with the patched Wine |with the patched Wine |(158a9e7) (right, |(158a9e7) (right, |anti-aliasing) | Patch: |anti-aliasing) | Patch: |attachment 69223 | Image 2 |attachment 69223 | Image 2
https://bugs.winehq.org/show_bug.cgi?id=33761
itoh shimon shimon@postfixnotation.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #69224|Touhou 10 with the vanilla |Touhou 10 with the vanilla description|Wine (158a9e7) (left, |Wine (158a9e7) (left, |jaggies), and Touhou 10 |jaggies), and Touhou 10 |with the patched Wine |with the patched Wine |(158a9e7) (right, |(158a9e7) (right, |anti-aliasing) | Patch: |anti-aliasing) | Patch: |attachment 69223 |attachment 69223 | Image 1
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #23 from itoh shimon shimon@postfixnotation.org --- (In reply to itoh shimon from comment #18)
Created attachment 69222 [details] bug-fixing patch for this issue
I make a bug-fixing patch, but I don't think this patch will be accepted. See readme-triangle-filter-resize-patch.md for usage. More details will be written at a later date.
This bug occurs because D3DX_FILTER_TRIANGLE is not implemented in D3DXLoadSurfaceFromMemory.
Touhou (10 (MoF) or later) depend heavily on D3DX[1]. Wine's D3DX has a lot of FIXME. So, Touhou (10 (MoF) or later) on Wine have some bugs.
Microsoft deprecated D3DX and created the successors (such as DirectXMath and DirectXTex)[2]. The successors are licensed under the MIT License.
The patch[3] is based on DirectXMath and DirectXTex[2]. The patch handles D3DX_FILTER_TRIANGLE in D3DXLoadSurfaceFromMemory.
The patch needs to be rewritten in C (currently, the patch is written in C++), but I'm busy...
---
[1] https://en.wikipedia.org/wiki/D3DX [2] https://walbourn.github.io/living-without-d3dx/ https://github.com/microsoft/DirectXMath https://github.com/microsoft/DirectXTex [3] attachment 69223
https://bugs.winehq.org/show_bug.cgi?id=33761
--- Comment #24 from Itoh Shimon shimon@postfixnotation.org ---
Microsoft deprecated D3DX and created the successors (such as DirectXMath and DirectXTex)[2]. The successors are licensed under the MIT License.
The patch[3] is based on DirectXMath and DirectXTex[2]. The patch handles D3DX_FILTER_TRIANGLE in D3DXLoadSurfaceFromMemory.
DirectXTex and DirectXMath are Microsoft's copyrighted works, but I understand by email sent from Alexandre Julliard that DirectXTex and DirectXMath don't violate the clean room guidelines[1] because they are licensed under the MIT License.
---
[1] https://wiki.winehq.org/Clean_Room_Guidelines