3.4
- klotim
- Khronikos
I am not sure about predication though. How do I know this is even working? Can someone tell me how posting the predication stuff in the SMAA ini works? How can I notice a difference with this? I just cut it out for now.
I do think improvements can certainly be made for this app though. Not everyone coming to this is going to understand they need to make a universal profile for a couple of these things.
After fooling with reshade my concerns about activation of SMAA are no more I guess. I can simply make the overlay a bit more transparent and my settings stick game to game. Thank god.
I guess this is pretty good as is. I would like to see a taskbar icon though if possible, and maybe some more information on predication and what to do with it in SMAA. Thanks for the app.
- Khronikos
#define SMAA_EDGE_DETECTION 2 //[1|2|3] //-1 = Luma edge detection, 2 = Color edge detection, 3 = Depth edge detection
//>SMAA Predication settings<\\
#define SMAA_PREDICATION 1 //[0:1] //-Enables predication which uses BOTH the color and the depth texture for edge detection to more accurately detect edges.
#define SMAA_PREDICATION_THRESHOLD 0.001 //[undef] //-Threshold to be used in the depth buffer.
#define SMAA_PREDICATION_SCALE 2.0 //[undef] //-How much to scale the global threshold used for luma or color edge detection when using predication
#define SMAA_PREDICATION_STRENGTH 0.4 //[undef] //-How much to locally decrease the threshold.
How do I properly set these for this version and know they are working?
On the previous poster's template they do not have an activation string. So I am confused as to where that went. They have the three predication settings, but written slightly different:
EdgeDetectionType=1
EdgeDetectionThreshold=0.100000
MaxSearchSteps=32
PredicationScale=0.200000
MaxSearchStepsDiagonal=16
CornerRounding=0
PredicationStrength=0.400000
PredicationThreshold=0.010000
DebugOutput=0
As you can see they have the three predication settings, but not the activation setting itself. Is this no longer required?
Per these settings: reshade.me/forum/shader-discussion/2222-...ty-settings-for-smaa
Color edge detection type is better than depth is what I understood. So picking 2 might be helpful. But Predication uses both, and I have no idea how to tell if that is activated properly. Actually, it says luminance is 1. I just chose color could not tell much difference, but depth was not good at all for choice 3. Tons of jaggies left.
I also used .08 for the edge threshold as it seemed to get a few more edges. Any lower and hard to tell the difference much. But something like .2 was horrible. 32 steps still seems overkill. 98 is like that poster said is just wasting performance. 24 might be more appropriate. I kept these settings for Dark Souls 3, where I could test a lot of aliasing on the armor.
No idea on predication.
- JBeckman
The .fxh file that has the code for the SMAA shader itself also has a pretty good description for each setting though it doesn't cover predication which is a new addition using the depth buffer together with either luma or color depending on what you've set for this.
Far as predication and ReShade 3.0 and the SMAA shader I think that ended up as a preprocessor line and not a shader setting thus it doesn't show up with the others.
/**
* _______ ___ ___ ___ ___
* / || \/ | / \ / \
* | (---- | \ / | / ^ \ / ^ \
* \ \ | |\/| | / /_\ \ / /_\ \
* ----) | | | | | / _____ \ / _____ \
* |_______/ |__| |__| /__/ \__\ /__/ \__\
*
* E N H A N C E D
* S U B P I X E L M O R P H O L O G I C A L A N T I A L I A S I N G
*
* for ReShade 3.0
*/
//
Preprocessor Settings
#ifndef SMAA_PREDICATION
#define SMAA_PREDICATION 0 //[0 or 1] Enables predication which uses BOTH the color and the depth texture for edge detection.
#endif
//
UI Variables
uniform int EdgeDetectionType <
ui_type = "combo";
ui_items = "Luminance edge detection\0Color edge detection\0Depth edge detection\0";
ui_label = "Edge Detection Type";
> = 1;
uniform float EdgeDetectionThreshold <
ui_type = "drag";
ui_min = 0.05; ui_max = 0.20; ui_step = 0.01;
ui_tooltip = "Edge detection threshold. If SMAA misses some edges try lowering this slightly.";
ui_label = "Edge Detection Threshold";
> = 0.10;
uniform int MaxSearchSteps <
ui_type = "drag";
ui_min = 0; ui_max = 112;
ui_label = "Max Search Steps";
ui_tooltip = "Determines the radius SMAA will search for aliased edges.";
> = 98;
uniform int MaxSearchStepsDiagonal <
ui_type = "drag";
ui_min = 0; ui_max = 20;
ui_label = "Max Search Steps Diagonal";
ui_tooltip = "Determines the radius SMAA will search for diagonal aliased edges";
> = 16;
uniform int CornerRounding <
ui_type = "drag";
ui_min = 0; ui_max = 100;
ui_label = "Corner Rounding";
ui_tooltip = "Determines the percent of anti-aliasing to apply to corners.";
> = 0;
#if SMAA_PREDICATION
uniform float PredicationThreshold <
ui_type = "drag";
ui_min = 0.005; ui_max = 1.00; ui_step = 0.01;
ui_tooltip = "Threshold to be used in the additional predication buffer.";
ui_label = "Predication Threshold";
> = 0.01;
uniform float PredicationScale <
ui_type = "drag";
ui_min = 0; ui_max = 8;
ui_tooltip = "How much to scale the global threshold used for luma or color edge.";
ui_label = "Predication Scale";
> = 0.2;
uniform float PredicationStrength <
ui_type = "drag";
ui_min = 0; ui_max = 4;
ui_tooltip = "How much to locally decrease the threshold.";
ui_label = "Predication Strength";
> = 0.4;
#endif
uniform int DebugOutput <
ui_type = "combo";
ui_items = "None\0'edgesTex' buffer\0'blendTex' buffer\0";
ui_label = "Debug Output";
> = false;
Those are the settings you can edit directly from the SMAA.fx file to have a default set you want immediately and without getting into the ReShade SMAA code itself.
- JBeckman
EDIT: Actually it probably would have to be copied into the rest of the settings and won't show up on it's own or you can just flip it from 0 to 1 in ReShade.fx and keep it enabled.
There's a chance it will hit some false edges and it might not do much for overall aliasing reduction depending on game but it's something that has to be tested per-game and then there's the reverse and logarithmic depth buffer settings and how some games handle depth or if ReShade can hook and get depth buffer detection at all such as due to network traffic closing this hook in the official release of ReShade.
- Martigen
Yeah it's all a bit confusing. Ok so a few things:Khronikos wrote: On the previous poster's template they do not have an activation string. So I am confused as to where that went. They have the three predication settings, but written slightly different:
- Edge detection type -- 'color' is 1, not 2. There's the old adage, 'computers count from 0'. In the transfer to Reshade 3, this became the norm. So the options are 0, 1 and 2; not 1, 2 3 like the old version.
- Enabling Predication -- As JBeckMan pointed out, you need to use the preprocessor definition to enable it, adding it under the Settings tab. The reason you can't toggle it along with the other SMAA options in the Reshade interface is that the shader needs to be compiled again for predication to take effect. The same is true of all settings in the Preprocessor Definitions section. You don't need to quit the game though, just hit 'Reload' in Reshade.
The last thing to say, and I had this in my post referenced above, is that you can save time by adding the preprocessor definitions to your universal default config file (my defaults below):
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0,FXAA_QUALITY__PRESET=39,SMAA_PREDICATION=1
This way I don't have to remember to play with them to add them.
And last but not least you asked how do you know if it's working? First, make sure a game has access to the depth buffer with the DisplayDepth.fx shader, and then make sure it's displaying correctly (toggle the DEPTH_ preprocessor options above until it looks right). Then, it's been a while -- but I think the difference will show up in SMAA's debug output, so you can check there.
- Khronikos
Martigen wrote:
Yeah it's all a bit confusing. Ok so a few things:Khronikos wrote: On the previous poster's template they do not have an activation string. So I am confused as to where that went. They have the three predication settings, but written slightly different:
It's interesting that you posted the old settings though, I noticed SMAA_PREDICATION_THRESHOLD used to be 0.001. In current Reshade, the default for PredicationThreshold is 0.01. I wonder if this makes a difference. I don't have time to test, but let me know if you do and see any results
- Edge detection type -- 'color' is 1, not 2. There's the old adage, 'computers count from 0'. In the transfer to Reshade 3, this became the norm. So the options are 0, 1 and 2; not 1, 2 3 like the old version.
- Enabling Predication -- As JBeckMan pointed out, you need to use the preprocessor definition to enable it, adding it under the Settings tab. The reason you can't toggle it along with the other SMAA options in the Reshade interface is that the shader needs to be compiled again for predication to take effect. The same is true of all settings in the Preprocessor Definitions section. You don't need to quit the game though, just hit 'Reload' in Reshade.
The last thing to say, and I had this in my post referenced above, is that you can save time by adding the preprocessor definitions to your universal default config file (my defaults below):
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0,FXAA_QUALITY__PRESET=39,SMAA_PREDICATION=1
This way I don't have to remember to play with them to add them.
And last but not least you asked how do you know if it's working? First, make sure a game has access to the depth buffer with the DisplayDepth.fx shader, and then make sure it's displaying correctly (toggle the DEPTH_ preprocessor options above until it looks right). Then, it's been a while -- but I think the difference will show up in SMAA's debug output, so you can check there.
Hello, thank you for the gracious posts. I have definitely settled in a bit with this version. I won't get around to testing predication for a bit as I don't think it does all that much anyway plus I'm super busy. Differences with SMAA are quite honestly very subtle past 12 search steps and around .08-.1 threshold with color type. I eagle eyed this up for over an hour yesterday on Dark Souls 3 and Bit Trip Runner in a variety of scenarios. I still use 32 search steps, but it doesn't seem to do much more than 12 or so for the most part.
I'm pretty happy with my setup now, and I just use my templates like has been suggested and add reshade ini and dll into each game. Not a huge deal. I just redo them for each game I actually play.
- Khronikos
- Tojkar
This would be extremely helpful if window position could be saved in the config file. It should be probably saved either percentual or as an off-set from display borders so if using someone else's config, the possibly smaller screen resolution wouldn't cause any problems by hiding it off-screen. Or using a fall-back to default if the resolution is different(EDIT: not a good idea as some older games changes resolution in menus or videos, so it would always be defaulted in those.).amoebae wrote: Is there a way for the size and position of the ReShade menu window to be remembered, for it to stick to whatever we last change it to? When hotsampling with SRWE it reverts back to the default long, narrow left-hand position each time (and of course whenever starting up the game fresh).
- crosire
- Topic Author
- Martigen
That probably needs to be the default. I've had same issues as above, and assume resizing in-game would save but hasn't. At least since I made my global profiles, this has defaulted to 0.crosire wrote: There is. In the main INI:
[GENERAL] SaveWindowState=1
- dmduncan37
- Shady
sfx.thelazy.net/games/game/1570/
- x8009
- lowenz
Already pointed out as an issue months agox8009 wrote: crosire , is there any update on the 3.4.1 that can't write manually ? 3.4.0 works fine, 3.4.1 on many games you can't write manually on the shaders options.
- crosire
- Topic Author
- MonarchX
- crosire
- Topic Author
- OtisInf
While we're at it, is there a way to have per-pass statistics for a shader? I've looked into adding this, but saw that the statistics were obtained using async queries and gave up there, and I couldn't find info regarding whether it is possible at all (I think it is, but likely more complicated than collecting a couple of counters). the reason I ask is that with shaders with a lot of passes, it's often a bit cumbersome to determine which pass(es) are the main time consumers so you can focus on those to optimize the shader.
If this can be delegated better to a 3rd party program, that's fine. I tried Nvidia NSight (with an UE4 demo app) but it didn't collect any info regarding reshade, so couldn't use that for profiling.
Looking forward to the changes!