STEAM GROUP
Special K - "Kaldaien's Mod" Special☆K
STEAM GROUP
Special K - "Kaldaien's Mod" Special☆K
306
IN-GAME
2,539
ONLINE
Founded
May 23, 2016
Language
English
All Discussions > Development > Topic Details
l a n g g i Apr 11, 2018 @ 11:27pm
Q: How to make Special K NOT loading saved shader state from the start?
Hello,

I use Spec K render mod tools to remove some UI shaders for FFXV but everytime I boot the game, my saved shader state always loaded so the main menu turn invisible. Have to bring up SK GUI, click render tools and turn it off, everytime. I do want to load the saved shaders, but later in the game, not from beginning :)

Is there a way to make SK not loading my shader state from beginning? Or can I bind it to hotkey & make it toggle like 3DMigoto? Sorry for this trivial question.

Keep up the amazing work and thanks :heart:
Last edited by l a n g g i; Apr 11, 2018 @ 11:30pm
< >
Showing 1-9 of 9 comments
JBeckman Apr 11, 2018 @ 11:50pm 
Hotkey functionality should work. :)

So instead of d3d11_shaders.ini you could have d3d11_shaders_hud.ini or any other file.

Leave the d3d11_shaders.ini file blank:
[DrawState.Pixel]

[DrawState.Vertex]
(Or just entirely empty.)

And keep the shaders in d3d11_shaders_hud.ini instead:

[DrawState.Pixel]
00000000=Disable

[DrawState.Vertex]
(Replacing the eight zeroes here with the shaders actual value.)

And then for dxgi.ini with the other SpecialK settings you can macro a hotkey for it like this:
[Macro.HUDToggle]
Shift+F3=D3D11.ShaderMods.ToggleConfig d3d11_shaders_hud.ini
(HUDToggle can be named anything, button combination will toggle the states from the shader ini file off and then on again.)


EDIT: Any number of shaders can be added to the .ini file this way to be toggled on demand, makes it very easy to manage such as toggling interface elements for games that have a multitude of shaders for each specific part rather than having to hotkey individual buttons for each shader. :)

d3d11_shaders.ini can also still be used to disable effects you want to remove, both of these can work together.
Last edited by JBeckman; Apr 11, 2018 @ 11:52pm
l a n g g i Apr 12, 2018 @ 5:21am 
I must be so dumb because I can't get it to work :(

So, I emptied d3d11_shaders.ini, moved all the shader values to d3d11_shaders_hud.ini, then add the following lines to dxgi:

Originally posted by JBeckman:
[Macro.HUDToggle]
Shift+F3=D3D11.ShaderMods.ToggleConfig d3d11_shaders_hud.ini

but Special K still seems to pull shader state from the d3d11_shaders (which now empty) because all the HUD now on, the assigned hotkey won't turn it off. What did I do wrong here?
JBeckman Apr 12, 2018 @ 5:49am 
Originally posted by l a n g g i:
I must be so dumb because I can't get it to work :(

So, I emptied d3d11_shaders.ini, moved all the shader values to d3d11_shaders_hud.ini, then add the following lines to dxgi:

Originally posted by JBeckman:

but Special K still seems to pull shader state from the d3d11_shaders (which now empty) because all the HUD now on, the assigned hotkey won't turn it off. What did I do wrong here?


Hmm.

It should not matter since the hotkey functionality was fixed a while back now but I'm using SpecialK 0.9.15.1 from FFXV.7z under Misc. Binary Dumps.
https://github.com/Kaldaien/SpecialK/releases
(Meaning the latest version since yesterday.)


And the ini files I'm using would be these:

FINAL FANTASY XV.rar
https://www57.zippyshare.com/v/1BnCImcX/file.html

d3d11_shaders.ini being blank here, d3d11_shaders_hud having three entries for text shadows, text and UI elements.

[DrawState.Pixel]
06e0325e=Disable
469a5a39=Disable
9499baff=Disable

#Text Shadow
#Text
#UI

[DrawState.Vertex]

(The # lines are irrelevant and just there as a memo or little note on what each of the three does.)

And dxgi.ini well that's mostly just this:

[Macro.HUDToggle]
Shift+F3=D3D11.ShaderMods.ToggleConfig d3d11_shaders_hud.ini

All three in the same folder next to dxgi.dll (SpecialK 64-bit) and then in-game Shift+F3 toggles the UI elements on and off. :)


That should be all, files mostly included as example since I'm using various tweaks and settings in dxgi.ini that might not be for everyone. :)
(And I'm still learning and testing some of the newer functionality.)

Perhaps setting IsolateD3D11DeferredContexts=false to true under [Render.DXGI] could help but since setting the hash values in d3d11_shaders.ini already works to disable the UI elements this should not be needed.
Last edited by JBeckman; Apr 12, 2018 @ 5:53am
l a n g g i Apr 12, 2018 @ 8:29am 
Still no luck for me, SK still only recognize d3d11_shaders.ini, not d3d_shaders_hud :(

I tested leaving 1 random pixel shader (a1583b5f, this is apparently skybox texture) in d3d11_shaders while the UI shaders I put in d3d11_shaders_hud. The skybox is skipped, but the ones in d3d11_shaders_hud still drawn. Pressing hotkey don't make them disappear either.

https://steamcommunity.com/sharedfiles/filedetails/?id=1359285046

Not sure what's wrong here. All files in same game folder. I used SK 0.9.9.15. Here's my .ini files
https://drive.google.com/file/d/1nNHHY2bkgXiWMEsgB-nnQKkyVwtYoII8/view?usp=sharing
(there are probably 2-3 different shader hash than yours, those are for removing vignette in Insomnia map and some combat UI as well, but I forgot which's which)

Should I just reference d3d11_shaders directly in macro command? Something like
[Macro.HUDToggle] Shift+F3=D3D11.ShaderMods.ToggleConfig d3d11_shaders.ini
Will that work?
Last edited by l a n g g i; Apr 12, 2018 @ 8:31am
JBeckman Apr 12, 2018 @ 8:45am 
Setting it so you are toggling d3d11_shaders.ini directly should also work, the shaders would have a disabled state on start and then pressing the hotkey would first enable them again before disabling the shaders the second time the key press is used.

I wonder why it's not working though, I might be overlooking something but what could it be?


EDIT: The first thing I'm seeing when I am comparing the files with my own is that I am using Unicode and yours are UTF though this is also the case for DXGI.ini and if that file is being read by SpecialK and retains all settings then the file encoding likely is of little concern.


EDIT: And there's nothing with the key binding macro in DXGI.ini, F1 might toggle cursor visibility but it should not interfere with the hotkey function in SpecialK.


EDIT: Still loads regardless of UTF8 or Unicode file encoding so it's not that. :)

EDIT: F1 is no issue either, what could this be caused by then.
Last edited by JBeckman; Apr 12, 2018 @ 9:01am
l a n g g i Apr 12, 2018 @ 11:17am 
Toggling d3d11_shaders directly is also a no go :(
So weird, it seems like I can't do macro keybind at all (well, macros for SK own OSD still works, I can also bring up 3rd party plugin/reshade just fine, so only for D3D features it won't work)

It's fine anyway, I can always bring up the GUI and click render tools button to toggle shader state on/off for now. I'll explore further later, I remember once injected SK globally for FFXV on release day before finally switching to local injection when the mini-mod out. Not sure if interfering config is a thing in SK or not, but seems like I haven't cleared FFXV game profile in My Mods folder. I'll try that.

As for now, big thanks for the help! :maglike:
Kaldaien Apr 12, 2018 @ 2:16pm 
Don't save the state? :P

The entire point of saving the state is so that it's persistently loaded and applied on the next run.


The basic answer was already explained by JBeckman:

[Macro.HUDToggle] Shift+F3=D3D11.ShaderMods.ToggleConfig d3d11_shaders_hud.ini

You setup a macro to perform whatever shader toggles you want and then you put those states into an INI file (that is NOT d3d11_shaders.ini, because that is applied at start).



Also, "interefering" config files are not possible. All config is either loaded from the global profiles directory or from the local game directory, never a mix of both. Use File | Browse Special K Logs from SK's control panel to get a shortcut to your logs directory, config files are always loaded from the parent directory of your logs dir.
Last edited by Kaldaien; Apr 12, 2018 @ 2:18pm
JBeckman Apr 12, 2018 @ 2:47pm 
Of course...

Saving the state would write it in to d3d11_shaders.ini

Though should that interfere with the hotkey functionality, feels like toggling the state should still enable or disable the shader but yeah I did miss something.
l a n g g i Apr 12, 2018 @ 8:45pm 
Originally posted by Kaldaien:
Don't save the state? :P

The entire point of saving the state is so that it's persistently loaded and applied on the next run.

Gotta save the state so I don't have to hunt the same shaders value everytime. I just want to be able to call them at will or bind them to hotkey, a feature which I did not know exists in SK prior to JBeckman 1st answer above :D

Originally posted by Kaldaien:
You setup a macro to perform whatever shader toggles you want and then you put those states into an INI file (that is NOT d3d11_shaders.ini, because that is applied at start).

This is what currently don't work on me. I can't setup hotkey to toggle saved shader state. For unknown reasons.

as for global v local injection, yeah, SK only loads the config locally from game folder :p
< >
Showing 1-9 of 9 comments
Per page: 1530 50

All Discussions > Development > Topic Details
Date Posted: Apr 11, 2018 @ 11:27pm
Posts: 9