openitg / openitg

The OpenITG Project Code - an open-source rhythm dancing game based on StepMania 3.95
http://openitg.gr-p.com/
156 stars 77 forks source link

D3D Causes all notes to be "Flat" #87

Closed chrispable closed 7 years ago

chrispable commented 7 years ago

Sometime between Beta3-WIP2: http://openitg.gr-p.com/wips/wip2-2013-01-25/

And Beta 5 release on github, the D3D backend was borked for the notes and now they always display as "flat" (OpenGL is NOT affected). I suspect it was the D3D 9 migration. SM5 does not exhibit this problem and the backends are very similar. I will try to track it down but have never dealt with any graphics api before.

Update: I tested a reverted DX8 backend and the problem persists. Based on old reports of the issue from 2008, it may have to do with vertex shaders, however, it did work in 2013 at some point so it was fixed for a bit at least. Bug report from 2008: http://www.boxorroxors.net/viewtopic.php?p=7988&sid=72c2b23126dc10aa7665b8e1851609b7#7988

And it seems to have been mitigated with revision 626 (not on git to see changes): Revision 626:

Setting the addition condition of: iMeshIndex > 0 in the if statement selects the proper note colors BUT the texture itself scrolls.

Trying to track down the commit that did this -- The git timeline is a bit fucked because branches were deleted so I can't see where they were forked from. So far I have found it has not appeared in the branch work of the dx9 commit, but was in the merge of the dx9 commit. I've also seen the bug as early as April 15th 2016 (Merge pull request #47 from augustg/bugfix/patch-data-not-mountable has the bug). Will Keep editing this with a narrowed date.

chrispable commented 7 years ago

OK! I solved the issue! It is indeed caused by (Merge pull request #47 from augustg/bugfix/patch-data-not-mountable)

The patch folder cannot be mounted and as such, the fixed note skins are not loaded. You can work around the issue by copying the noteskins to the root itg directory structure.

Do NOT touch the rendering pipeline, it does work fine. It was purely a resurgence of that 2008 issue not getting the updated assets to use the latest rendering pipe for d3d.

spigwitmer commented 7 years ago

Thanks a ton for looking into this.

Is it that it can't be mounted or that the VFS priority for the patch file/dir got fucked (log.txt should have a mountpoint list at the beginning somewhere)?

chrispable commented 7 years ago

Looks like it can't handle a windows drive letter. Note the line in the after: "dirro ..... Data/patch/patch ..... /"

BEFORE my change 00:00.041: VFS: mounting Data/patch/patch/. ///////////////////////////////////////// 00:00.041: WARNING: Couldn't create /D:: Invalid argument ///////////////////////////////////////// 00:00.041: ======= MOUNTPOINTS ========= 00:00.041: dirro ..... /D:/oitg/openitg/inst-tmp/Data/patch/patch ..... / 00:00.041: mountpoints ..... ..... / 00:00.041: mem ..... (cache) ..... /@mem/ 00:00.041: oitg ..... D:/oitg/openitg/inst-tmp/CryptPackages ..... /Packages/ 00:00.041: dir ..... D:/oitg/openitg/inst-tmp ..... / 00:00.041: =============================

AFTER my Change VFS: mounting Data/patch/patch/. WARNING: Couldn't create /D:: Invalid argument ======= MOUNTPOINTS ========= dirro ..... Data/patch/patch ..... / dirro ..... /D:/oitg/openitg/inst-tmp/Data/patch/patch ..... / mountpoints ..... ..... / mem ..... (cache) ..... /@mem/ oitg ..... D:/oitg/openitg/inst-tmp/CryptPackages ..... /Packages/ dir ..... D:/oitg/openitg/inst-tmp ..... /