Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
KeepUI for FFXIV
// KeepUI for FFXIV
// Author: seri14
//
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
// of the public at large and to the detriment of our heirs and
// successors. We intend this dedication to be an overt act of
// relinquishment in perpetuity of all present and future rights to this
// software under copyright law.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#include "ReShade.fxh"
texture FFKeepUI_Tex{ Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; };
sampler FFKeepUI_Sampler{ Texture = FFKeepUI_Tex; };
void PS_FFKeepUI(float4 pos : SV_Position, float2 texcoord : TEXCOORD, out float4 color : SV_Target)
{
color = tex2D(ReShade::BackBuffer, texcoord);
}
void PS_FFRestoreUI(float4 pos : SV_Position, float2 texcoord : TEXCOORD, out float4 color : SV_Target)
{
float4 keep = tex2D(FFKeepUI_Sampler, texcoord);
float4 back = tex2D(ReShade::BackBuffer, texcoord);
color = lerp(back, keep, keep.a);
color.a = keep.a;
}
technique FFKeepUI <
ui_tooltip = "Place this at the top of your Technique list to save the UI into a texture for restoration with FFRestoreUI.\n"
"To use this Technique, you must also enable \"FFRestoreUI\".\n"
"If you notice invalid colors on objects, enable FXAA in Final Fantasy XIV's Graphics Settings.\n"
"Open [System Configuration]\n"
" -> [Graphics Settings]\n"
" -> [General]\n"
" Set [Edge Smoothing (Anti-aliasing)] from \"Off\" to \"FXAA\"";
>
{
pass
{
VertexShader = PostProcessVS;
PixelShader = PS_FFKeepUI;
RenderTarget = FFKeepUI_Tex;
}
}
technique FFRestoreUI <
ui_tooltip = "Place this at the bottom of your Technique list to restore the UI texture saved by FFKeepUI.\n"
"To use this Technique, you must also enable \"FFKeepUI\".\n"
"If you notice invalid colors on objects, enable FXAA in Final Fantasy XIV's Graphics Settings.\n"
"Open [System Configuration]\n"
" -> [Graphics Settings]\n"
" -> [General]\n"
" Set [Edge Smoothing (Anti-aliasing)] from \"Off\" to \"FXAA\"";
>
{
pass
{
VertexShader = PostProcessVS;
PixelShader = PS_FFRestoreUI;
}
}
@DAOWAce

This comment has been minimized.

Copy link

commented May 18, 2019

If only this existed years ago..

This cures the main problem with ReShade in games and is absolutely invaluable when using nearly every option that exists, but especially for things like MXAO.

It looks like SMAA still bleeds through onto the floating nameplates though (not sure about other effects). Can anything be done about this? Just a minor issue.

Regardless, thank you so much for creating this.

@DustArma

This comment has been minimized.

Copy link

commented Jun 17, 2019

If only this existed years ago..

This cures the main problem with ReShade in games and is absolutely invaluable when using nearly every option that exists, but especially for things like MXAO.

It looks like SMAA still bleeds through onto the floating nameplates though (not sure about other effects). Can anything be done about this? Just a minor issue.

Regardless, thank you so much for creating this.

If you still have the problem, change SMAA to "Depth edge detection" and it will avoid floating nameplates.

Also, BRD's Job Gauge isn't detected properly, it gets detected as a rectangle while other job gauges get detected in their proper shapes.

@sebawlm

This comment has been minimized.

Copy link

commented Jun 28, 2019

Hi! First off, thank you for this. It's amazing and makes ReShade so much more workable.

Just wanted to report an issue I'm having with the release of ShB (I haven't seen it before), where flower petals are being detected as UI elements. (I actually thought it was intentional at first, in a "Twilight Princess" style of showing the world is terrible.) See:
https://i.imgur.com/E2XHq7L.jpg

Here are the other Shaders I have active, for what it's worth:
https://i.imgur.com/E2XHq7L.jpg

Even disabling all of them, however, the issue remains.

Thanks for your hard work on this!

@VampireCactus

This comment has been minimized.

Copy link

commented Jul 4, 2019

Hi! First off, thank you for this. It's amazing and makes ReShade so much more workable.

Just wanted to report an issue I'm having with the release of ShB (I haven't seen it before), where flower petals are being detected as UI elements. (I actually thought it was intentional at first, in a "Twilight Princess" style of showing the world is terrible.) See:
https://i.imgur.com/E2XHq7L.jpg

Here are the other Shaders I have active, for what it's worth:
https://i.imgur.com/E2XHq7L.jpg

Even disabling all of them, however, the issue remains.

Thanks for your hard work on this!

I was running into this as well! Weirdly enough, what fixed it for me was turning on the in-game FXAA.

@NukaSarsaparilla

This comment has been minimized.

Copy link

commented Jul 11, 2019

Hello! Hope this is the right place to report this. Really love this shader, but having a small issue. Currently on the most up to date version of the game (5.0, Shadowbringers) and this shader works great on everything except apparently my Astrologian gauge? https://i.imgur.com/kEpUZk0.png

Tried changing the FXAA in the game settings, neither option fixes this. The only thing that fixes it is turning off FFRestoreUI.

Thank you for your time.

EDIT: To clarify, the other classes I play (Red Mage, White Mage, Dancer) do not have this issue, but I do not play the other classes beyond that to know if they are affected.

@Mortalitas

This comment has been minimized.

Copy link

commented Jul 16, 2019

Hello! Hope this is the right place to report this. Really love this shader, but having a small issue. Currently on the most up to date version of the game (5.0, Shadowbringers) and this shader works great on everything except apparently my Astrologian gauge? https://i.imgur.com/kEpUZk0.png

Tried changing the FXAA in the game settings, neither option fixes this. The only thing that fixes it is turning off FFRestoreUI.

Thank you for your time.

EDIT: To clarify, the other classes I play (Red Mage, White Mage, Dancer) do not have this issue, but I do not play the other classes beyond that to know if they are affected.

The only solution to this problem is to use a ReShade build that has been modified to handle those bits of the UI in the dll itself, and the only one I'm aware of at present which does this is GShade.

Here's the direct download (permalink; always has the latest version):
https://drive.google.com/file/d/1RwXCCD5xcTmNHRbqzwBcm3MtZ0ZtF7Z6/

And the associated Discord server that I recommend you join in case you need support:
https://discord.gg/39WpvU2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.