Atelier Ayesha: The Alchemist of Dusk DX

Atelier Ayesha: The Alchemist of Dusk DX

View Stats:
百合 姫 Jan 21, 2020 @ 3:32am
2
3
4
2
8
Atelier Graphics Tweak
Here is a resolution adjustment + SMAA injection tweak for Ayesha.

Features:
  • SMAA injection before the UI is drawn. Disable by removing HLSL files.
  • Resolution lock removed.
  • 4x (2Wx2H) supersampling, now fixed (and forced on).
  • Experimental "text rendering stutter" removal hack, which removes the stutter that happens whenever a new line of text is displayed on screen. Buggy.

Note that supersampling and SMAA are complementary.
Supersampling gives excellent stability in motion, while SMAA gives good edge antialiasing.

For those on extremely slow GPUs, this tweak will dramatically decrease performance of the game, as supersampling is not cheap. If anyone is interested, I can also release versions without supersampling (eg. just the resolution override enabled).

Note that running the game above 4K has not been tested. You may run into "interesting" issues at such high resolutions.

Text rendering in the Arland series of games (and this one) is terribly borked. I found a terrible hacky way to address this, but I'm actually surprised it works. It mostly works but may break in funky ways that I can't easily debug. The stutter code basically removes a whole bunch of useless PCIe transfers that kill GPU performance. Note that it is known to crash at a certain end-game boss battle, nearly immediately upon entering the battle. As such, this fix should only be considered experimental.

old notes:
I think I've managed to remove the useless PCIe transfers which were leading to text rendering stutter. A number of users have reported that the experimental fix for stutter seems to work. It doesn't for me, but the fix only addresses GPU driver stutter, not CPU stutter. Also, logging is forced on, and the implementation is fully synchronous (as in, it will stall the host program until the log is finished writing). Once I feel more confident in the tweak, I'll consider turning logging off (or making it more performant).

Getting Help

Since this is my first graphics hooking project, I expect to find bugs even though I do test on the three major graphics IHVs. Atelier Graphics Tweak currently logs to a few files, but the most important one is "mraaaow.log".

Basically, if Atelier Graphics Tweak isn't working for you, posting the contents of the log would help a lot.

Common issues:
  • Not working with Reshade / Special K / etc.
    Atelier Graphics Tweak does both competitive early (pre-Present) and lazy late (post-Present) hooking. Injectors that hook DirectX can prevent my code from working. Early hooking is necessary because the resolution of the render targets has to be changed at allocation time and can't be changed afterwards.
  • Popup when starting the game
    I have some code that detects whether the user wanted to apply a resolution hack and whether the code was successful in doing so. If not, I pop up the error message. The message has been improved and now tells what failed to hook (eg. why it isn't working). This check runs around 1s after the game starts.

Known issues:
  • If your system is really slow, the resolution hack may not apply in time for the check.
  • The anti-stutter hack is really buggy, and will crash in certain, reproducible scenarios.
  • The anti-stutter hack is really buggy, and sometimes text will fail to render (it will render as a white square). Usually this manifests as a single missing character.

Download:

Latest version:
21Jan06 "special" - New version that works with all games (Rorona-Ryza).
2x supersampling always enabled now, anti-stutter hack is now considered experimental and the zip has both versions.
https://drive.google.com/file/d/1EG5J_fOX8goxtBkEOq8wFRQQyzMpN979/view?usp=sharing
  • You should rename whichever DLL you want to use to dinput8.dll.
  • The game goes down a different code path when outputting to 1920x1080. I have special code to address this, but it's not super reliable. (known broken in Rorona)
  • The bulletproof solution requires the use of a resolution other than 1920x1080, which forces the game to go down a generic resolution path.

Version v4 (first release for Arland)
OLD VERSION -> https://drive.google.com/drive/folders/1Q6QBPsgXnc8zT-uddZdCVMHq5CbXg8xG?usp=sharing <- OLD VERSION
  • dinput8.dll -> mostly working 1X version
  • dinput8_2x.dll -> experimental 2X supersampling version
Last edited by 百合 姫; Jan 6, 2021 @ 4:44pm
< >
Showing 1-15 of 98 comments
Mistfox Jan 21, 2020 @ 9:07am 
Thanks, but any instructions on how to use this? Do I replace another file somewhere with this?
Tiasmoon Jan 21, 2020 @ 9:10am 
If its like Lily's other tweaks, placing the file in the game folder (the one with the .exe files) should be enough.
Mistfox Jan 21, 2020 @ 9:44am 
Originally posted by Tiasmoon:
If its like Lily's other tweaks, placing the file in the game folder (the one with the .exe files) should be enough.

Thanks, my transition scenes are messed up, once I cross into a "dungeon", every time I try to do synthesis or complete a quest, I get a black screen. The cursor can be seen and I think the selections are there, I just can't see them.
CLG Jan 21, 2020 @ 11:29am 
I put it in the directory and it had no change at all to anything in the game.

I have an nvidia gtx 1070 with 441.87 drivers
Mistfox Jan 21, 2020 @ 12:50pm 
Nope, no change to mine either, still get black screens.
Tiasmoon Jan 21, 2020 @ 2:23pm 
Likewise, no effect for me. Also, the google drive only contains the dll for the 2x version.
Black99 Jan 21, 2020 @ 4:46pm 
I think people added the .dll without removing the "_2x" in the name's file. I removed the "_2x" but for me it crash at start. I don't think it's because my "copy", I launched the game through Steam without any third-party .dll (you know what I mean).

This is the message that I receive.

--------------------------- DirectX 11 API Error --------------------------- You are a Bad Girl. Line: 633, Func: smaa_wrapper Return code: 80070002 --------------------------- Aceptar ---------------------------

Last edited by Black99; Jan 21, 2020 @ 5:07pm
CLG Jan 21, 2020 @ 5:18pm 
Originally posted by Black99:
I think people added the .dll without removing the "_2x" in the name's file. I removed the "_2x" but for me it crash at start. I don't think it's because my "copy", I launched the game through Steam without any third-party .dll (you know what I mean).

This is the message that I receive.

--------------------------- DirectX 11 API Error --------------------------- You are a Bad Girl. Line: 633, Func: smaa_wrapper Return code: 80070002 --------------------------- Aceptar ---------------------------

I just tried the same thing and got the same message. It also made a few text files in the directory named 'mraaaow" and "smaa_impl"


mraaaow.txt
mraaaow!attach dinput8 loaded dinput8 hooked initKiero bind_deferred Map bind_deferred Unmap bind_deferred PSSetShader bind_deferred Draw bind_deferred CopySubresourceRegion bind CreateBuffer bind CreateTexture2D bind RSSetViewports bind CreatePixelShader bind Flush bind Present hackCreatePixelShader hackCreateBuffer hackPSSetShader hackFlush getting game's device / immediate context Game Resolution: 1920x1080 Game Device = 0000000006692fa8 Game Immediate Context = 0000000006771120

smaa_impl.txt
SMAA_Init: Initializing shared resources SMAA_Init: Initializing per-context resources SMAA_Init: Initializing render passes Compiling shader from file: SMAAWrapper.hlsl Defines: #define SMAA_PRESET_ULTRA #define SMAA_HLSL_4_1 Entry point: DX10_SMAAEdgeDetectionVS, profile: vs_4_0, dwShaderFlags: 00048800 Shader compilation error detected! nullptr string deref
Mistfox Jan 22, 2020 @ 5:11am 
So... any instructions on how to use this? :)
百合 姫 Jan 22, 2020 @ 11:21am 
wow I'm an idiot, linked the file and not the folder :(
New link to folder: https://drive.google.com/drive/folders/1Q6QBPsgXnc8zT-uddZdCVMHq5CbXg8xG?usp=sharing

you actually do need the HLSL files (for SMAA antialiasing) and D3DCompiler_47.dll as I haven't gotten around to writing a path without it. In the future they will be precompiled so the hack will be self contained.

Some of the issues here are going to be related to anti-stutter code, as that doesn't just modify DX11 API calls, but actually captures them and prevents their execution. However I'm not sure if it works because I still get stutters, which suggests there's some more stuff going on.

I'll release a version without the anti-stutter hack later.
Last edited by 百合 姫; Jan 22, 2020 @ 11:23am
CLG Jan 22, 2020 @ 11:36am 
Just tested the new folder and it got rid of the stuttering in Ayesha for me. Don't have time to play and test some more to see if anything is broken. Would it be possible to just release a stand alone anti stutter fix as well? I mostly just want to see the comparisons with the SMAA and have a backup incase the SMAA created any issues in the future.
Last edited by CLG; Jan 22, 2020 @ 11:45am
Tiasmoon Jan 22, 2020 @ 11:40am 
The SMAA looks amazing. Didnt think the result would be quite this good. It seems like the game doesnt support DS4 controllers without the steam overlay working, tho.

Thanks for your hard work so far Lily~
Last edited by Tiasmoon; Jan 22, 2020 @ 11:40am
Black99 Jan 22, 2020 @ 12:02pm 
Wow, it also fixed the stuttering on my gt 1030! Thanks!

banana123 Jan 22, 2020 @ 1:11pm 
The stutters are all gone! Thank you so much for this!
< >
Showing 1-15 of 98 comments
Per page: 1530 50