Help me modify UI Mask

  • demolisher
  • Topic Author
More
6 years 1 week ago #1 by demolisher Help me modify UI Mask was created by demolisher
Greetings! I'm a bit new to messing with shader code, so I need some help with this. Dishonored 2(and dlc) default depth buffer is actually mask for UI elements, which is good side effect that I think can be used for masking UI from SMAA for example. So here's the question: how do I modify UIMask.fx to use depthbuffer instead of png?
texture tUIMask_Mask <source="UIMask.png";> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };
Thanks in a advance.
P.S. Here's some images:


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

  • demolisher
  • Topic Author
More
6 years 1 week ago #2 by demolisher Replied by demolisher on topic Help me modify UI Mask
Nevermind, figured it out myself. In case anyone wants to use this for Dishonored 2/DLC, just replace UIMask.fx with this code:
Warning: Spoiler!

and use this depth buffer settings:
RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=100000.0,
RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,
RESHADE_DEPTH_INPUT_IS_REVERSED=0,
RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0

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

  • Logan
More
1 year 3 days ago - 1 year 3 days ago #3 by Logan Replied by Logan on topic Help me modify UI Mask
Hello! In many games, increasing contrast and exposure improves the picture, but often leads to a strong overexposure of the sky. This modification of UIMask by demolisher can solve this problem. Unfortunately, this modified UIMask now works a little wrong and masks the ground instead of masking the sky. so the effects color corrections affect the opposite only on the sky. It would be cool if a demolisher or someone who knows about shaders could finalize this modification.
ibb.co/vhxsRL8
[img


 
Last edit: 1 year 3 days ago by Logan.

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

  • Logan
More
1 year 1 day ago #4 by Logan Replied by Logan on topic Help me modify UI Mask
Everything, I also figured it out myself, all the magic is in this line
mask = lerp(1.0, 1-mask, fMask_Intensity);
now the luminosity of the sky can be controlled using the UIMask intensity.

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.