UI Mask that enables/disables based on pixel color.

  • Posts: 8
1 month 1 week ago #1 by MinerOfWorlds
Like how UI detect uses a pixels color to know when to remove effects but instead only mask the black areas from a texture.

Sorry if this is a dumb idea.

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

  • Posts: 122
1 month 1 week ago #2 by prod80
Sounds like you want to run an effect, but the effect also changes blacks. Sounds like you are not using the right effect for the job? Exactly what are you trying to do?

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

  • Posts: 8
1 month 1 week ago #3 by MinerOfWorlds
Sadly, I don't have the right know-how to make a shader, but what i would like is basically a version of UIMask that auto-enable/disables based on a certain pixels color. That way, inventory screens and the like can be unaffected by shaders.

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

  • Posts: 122
1 month 1 week ago #4 by prod80

MinerOfWorlds wrote: Sadly, I don't have the right know-how to make a shader, but what i would like is basically a version of UIMask that auto-enable/disables based on a certain pixels color. That way, inventory screens and the like can be unaffected by shaders.


Yes but, so would every other pixel with the same color... and rarely you'd meet an inventory screen (or other screens) that is uniformly the same color with no variation. If really it's a big issue that reshade is enabled when the inventory screen is open, perhaps match the key to enable/disable reshade and to open/close inventory so when you open inventory - reshade is disabled. You can also set a hotkey on an effect... so if DoF makes inventory unreadable, you can disable that using same key as you use to open inventory (right click on effect -> "click here to set hotkey").

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

  • Posts: 8
1 month 1 week ago #5 by MinerOfWorlds
I'm sorry, but I don't understand. If pixel (x, y) is (r, g, b) then mask the frame using a .png to know what pixels should be affected.

Again, sorry if this is stupid.

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

  • Posts: 122
1 month 1 week ago #6 by prod80

MinerOfWorlds wrote: I'm sorry, but I don't understand. If pixel (x, y) is (r, g, b) then mask the frame using a .png to know what pixels should be affected.

Again, sorry if this is stupid.


Because even if you say "only apply mask on a specific color", you'll find that such color will be found in many places, but it's just a pixel here and there.

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

  • Posts: 8
1 month 1 week ago #7 by MinerOfWorlds
I don't mean mask a certain color, I mean turn on masking automatically once a certain condition is met.

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

  • Posts: 122
1 month 1 week ago #8 by prod80
Yes but condition will be found multiple times, even when it should be false, and the mask will need to be programmed in based on that specific game and different varieties of menu's it may have / different colors of menu's. It gets way too specialized for a specific use case and not able to use the shader outside of that scenario. If certain effects are a problem with certain game menu's (typically DoF effects are) you can assign a hotkey to disable that effect when the open menu key is pressed. That will work universally in any game.

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

  • Posts: 8
1 month 1 week ago #9 by MinerOfWorlds
I figured the pixels coordinates, color and the mask would be user defined just like UIMask.fx

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

  • Posts: 100
1 month 1 week ago #10 by Tojkar
I remember there was at some point such shader that measures a few pixels on screen an is able to toggle shaders based on that. Can't remember what was it called and thus can't find it, but with enough search you should be able to come up with what you're looking for.

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

  • Posts: 8
1 month 1 week ago #11 by MinerOfWorlds
That's UIdetect, but it affects the whole screen which looks kinda unprofessional to me. I think a version of UIdetect that only affected certain areas like UImask would look better.

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

  • Posts: 280
1 month 1 week ago #12 by brussell
@prod80
Were you drunk or sth :cheer:, cause you clearly haven't understood MinerOfWorlds request at all. In case you don't know UIDetect, which seems to be the case, here you can read about it:
reshade.me/forum/shader-presentation/4024-uidetect
github.com/crosire/reshade-shaders/blob/.../Shaders/UIDetect.fx
github.com/crosire/reshade-shaders/blob/...Shaders/UIDetect.fxh

@MinerOfWorlds
It certainly is possible to make UIDetect work with UI masks. I will look into it and report back if I have something useful.

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

  • Posts: 8
1 month 1 week ago #13 by MinerOfWorlds
Thank you so much, brussell! I hope this will be useful for other people as well.

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

  • Posts: 122
1 month 1 week ago #14 by prod80

brussell wrote: @prod80
Were you drunk or sth :cheer:, cause you clearly haven't understood MinerOfWorlds request at all. In case you don't know UIDetect, which seems to be the case, here you can read about it:
reshade.me/forum/shader-presentation/4024-uidetect
github.com/crosire/reshade-shaders/blob/.../Shaders/UIDetect.fx
github.com/crosire/reshade-shaders/blob/...Shaders/UIDetect.fxh

@MinerOfWorlds
It certainly is possible to make UIDetect work with UI masks. I will look into it and report back if I have something useful.


No I apparently did not get what exactly he wanted to achieve here, anyway, cheers

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

  • Posts: 280
1 month 1 day ago #15 by brussell

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