a subtle hack UI Mask

More
1 year 2 months ago - 1 year 2 months ago #1 by UTwelve
a subtle hack UI Mask was created by UTwelve
a hack UI Mask
Working in FF14. so,maybe other games will work too...
so subtle,you need to try,I can't guarantee anything. :unsure:

There are three in the list,is order
  • HackUIMask ←top
  • ** other fx **
  • HackUICut ←is a UI black mask,avoid UI impact on next FX
  • **other fx **
  • HackUIRestore ←end

HackUImask.fx

Warning: Spoiler!
Last edit: 1 year 2 months ago by UTwelve. Reason: 渣英语
The following user(s) said Thank You: Wicked Sick, du, AssassinsDecree, Radstark

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #2 by UTwelve
Replied by UTwelve on topic a subtle hack UI Mask
other game
Warning: Spoiler!
The following user(s) said Thank You: Wicked Sick

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago - 10 months 3 weeks ago #3 by aaronth07
Replied by aaronth07 on topic a subtle hack UI Mask
Probably a stupid question, but how is this different from the already existing UI mask that comes with Reshade?
Last edit: 10 months 3 weeks ago by aaronth07. Reason: spelling correction

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #4 by Daodan
Replied by Daodan on topic a subtle hack UI Mask

aaronth07 wrote: Probably a stupid question


Not at all. In some games the UI is visible in the alpha component of the backbuffer. With that it is possible to create a UI mask at runtime (i.e. a mask that automatically adapts to the UI). As far as i know UIMask.fx masks the UI based on an image you provide and UIDetect.fx can bypass other effects (DOF for example) based on the color of certain pixels.

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #5 by Scorpio82CO
Replied by Scorpio82CO on topic a subtle hack UI Mask
can be used to respect fog and lightning effects.. i.e. bypass the mxao shader or rtgi shader?

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #6 by dddfault
Replied by dddfault on topic a subtle hack UI Mask
unfortunately no

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago - 9 months 1 week ago #7 by peronmls
Replied by peronmls on topic a subtle hack UI Mask
honestly Would there ever be such a fix? It's the only thing really bad with reshade. I never understood why the dev's never try to fix it but can release more advanced shaders like raytracing that will just obscure any HUD on screen. That's the only immersion breaking reshade does for me.
Last edit: 9 months 1 week ago by peronmls.

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #8 by Marty McFly
Replied by Marty McFly on topic a subtle hack UI Mask

peronmls wrote: honestly Would there ever be such a fix? It's the only thing really bad with reshade. I never understood why the dev's never try to fix it but can release more advanced shaders like raytracing that will just obscure any HUD on screen. That's the only immersion breaking reshade does for me.


Doubtable that it'll ever happen. Each game renders their UI in a different way, different elements and so on. It would defeat the purpose of ReShade to manage things on a game to game level. It also can't be done perfectly with a shader either as UI elements are so diverse, detecting them with any sort of failsafe heuristic is impossible. Also it's not possible to restore data obscured by the UI, so effects that would require such data cannot be fixed, even if the UI was detected perfectly.
The following user(s) said Thank You: AssassinsDecree

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #9 by Martigen
Replied by Martigen on topic a subtle hack UI Mask

Marty McFly wrote:

peronmls wrote: honestly Would there ever be such a fix? It's the only thing really bad with reshade. I never understood why the dev's never try to fix it but can release more advanced shaders like raytracing that will just obscure any HUD on screen. That's the only immersion breaking reshade does for me.


Doubtable that it'll ever happen. Each game renders their UI in a different way, different elements and so on. It would defeat the purpose of ReShade to manage things on a game to game level. It also can't be done perfectly with a shader either as UI elements are so diverse, detecting them with any sort of failsafe heuristic is impossible. Also it's not possible to restore data obscured by the UI, so effects that would require such data cannot be fixed, even if the UI was detected perfectly.

But isn't this exactly what the shader posted in the OP is doing? It's not even using a texture as an overlay, so it seems to be doing it on the fly. I haven't tried the shader yet but it's intriguing.

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #10 by Marty McFly
Replied by Marty McFly on topic a subtle hack UI Mask
It uses the alpha channel of the backbuffer before any rendering happened. By chance, FF14 draws the UI mask into alpha channel, so you have info where UI is and where not. No other game I know of does this, and thus you'd have to infer from the screen colors, a failsafe method is impossible that way. Plus you cannot restore data behind the UI, that's why this shader masks it with black to mask it from future effects that might smear it beyond the UI mask borders.

Also, transparent effects, what the person above asked for, is completely impossible. Just because our eyes can discern what's a transparent object does not mean that a shader can.
The following user(s) said Thank You: AssassinsDecree

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #11 by Martigen
Replied by Martigen on topic a subtle hack UI Mask

Marty McFly wrote: It uses the alpha channel of the backbuffer before any rendering happened. By chance, FF14 draws the UI mask into alpha channel, so you have info where UI is and where not. No other game I know of does this, and thus you'd have to infer from the screen colors, a failsafe method is impossible that way. Plus you cannot restore data behind the UI, that's why this shader masks it with black to mask it from future effects that might smear it beyond the UI mask borders.

Also, transparent effects, what the person above asked for, is completely impossible. Just because our eyes can discern what's a transparent object does not mean that a shader can.

Cool, thanks for explaining Marty :)
The following user(s) said Thank You: AssassinsDecree

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #12 by Niko of Death
Replied by Niko of Death on topic a subtle hack UI Mask
Omega Force games all display the UI in the depth buffer (as an example, here's Warriors Orochi 4's: i.imgur.com/vU2yFLL.png ), and I have long hoped this could be used for automatic UI masking. Would it be possible/easy to adapt your shader to use this information to create a UI mask?

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago - 7 months 2 weeks ago #13 by crosire
Replied by crosire on topic a subtle hack UI Mask
Should be pretty simple to do by replacing this line: github.com/UTwelve/Reshade-shaders/blob/...a2/HackUImask.fx#L44
float4 UIMask = tex2D(ReShade::BackBuffer, texcoord).a;
with this:
float4 UIMask = tex2D(ReShade::DepthBuffer, texcoord).x == 0.0;
Provided that the depth value at the UI is indeed 0.0 (which I assumed based on the pictures). This will just create a mask that masks out all parts of the screen which have a depth value of 0.0.
Last edit: 7 months 2 weeks ago by crosire.
The following user(s) said Thank You: Niko of Death

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #14 by Niko of Death
Replied by Niko of Death on topic a subtle hack UI Mask
That worked, thanks (just had to change 0.0 to 1.0 since the depth was reversed)
i.imgur.com/hcwTlLq.png

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #15 by Radstark
Replied by Radstark on topic a subtle hack UI Mask
Can confirm it also works on DCUO. Awesome!

Please Log in or Create an account to join the conversation.

More
3 weeks 6 days ago - 3 weeks 6 days ago #16 by nu_bie
Replied by nu_bie on topic a subtle hack UI Mask
so I'm out of my element here but in Cold Steel 3, this UI Mask actually highlights the UI instead. applying my shaders on the UI instead on the game itself. is there a way to sorta invert it?

edit: found out how, just gotta switch destblend around. works for the UI but not for character dialogue bust, hmm.
Last edit: 3 weeks 6 days ago by nu_bie.

Please Log in or Create an account to join the conversation.