(for pre1.1 MER) MER with SMAA (unofficial)

  • Posts: 285
5 years 4 months ago - 5 years 4 months ago #1 by brussell
Note: This is for MER before version 1.1. The newest MER 1.1 now supports SMAA.

I've taken the SMAA code from Sweetfx and added it to MER. It's not really beautiful due to some differences in syntax and redundant declarations, but it works nice. It also includes the tweaks from my other thread, because of some problems with the original file (multiple rendertargets).

Link:
www.sendspace.com/file/joo81c


Credits: CeeJay.dk : SMAA code pieces

For Marty: This archive lists the differences between original Reshade.fx and this one.
www.sendspace.com/file/qb26dj
The following user(s) said Thank You: Marty McFly, calafate, Constantine PC, BrandonHortman, jas01, jmp909

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

  • Posts: 155
5 years 4 months ago #2 by jas01
Fully optimized reshade.fx with SMAA! Thank you Brussell. :)

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

  • Posts: 54
5 years 4 months ago #3 by huss93
hi brosell for its not working when I want to put it on metro last light he said failed

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

  • Posts: 54
5 years 4 months ago #4 by huss93
metro last light

reshade 0.15.0.717 by crosire

compiling effect ....failed

c:/program files (x86)/ METRO LAST LIGHT /reshade.fx(757,2): error x3004 : undeclared identifer 'SMAAedgedetectionVS'


please help

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

  • Posts: 285
5 years 4 months ago #5 by brussell
You have forgotten to put the SMAA folder into the same directory where your Reshade.fx resides.
The following user(s) said Thank You: huss93

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

  • Posts: 54
5 years 4 months ago #6 by huss93
please how and maximum smaa? I want to test my sli gtx 980 lol changed valeur




define SMAA_Threshold 0.10 //[0.05 to 0.20] Edge detection Threshold. If SMAA misses some edges try lowering this slightly. I prefer between 0.08 and 0.12.

#define SMAA_MAX_SEARCH_STEPS 16 //[0 to 98] Determines the radius SMAA will search for aliased edges

#define SMAA_MAX_SEARCH_STEPS_DIAG 6 //[0 to 16] Determines the radius SMAA will search for diagonal aliased edges

#define SMAA_CORNER_ROUNDING 0 //[0 to 100] Determines the percent of antialiasing to apply to corners. 0 seems to affect fine text the least so it's the default.

#define SMAA_EDGE_DETECTION 2 //[1|2|3] 1 = Luma edge detection, 2 = Color edge detection, 3 = Depth edge detection

#define SMAA_DIRECTX9_LINEAR_BLEND 0 //[0 or 1] Using DX9 HARDWARE? (software version doesn't matter) if so this needs to be 1 - If not, leave it at 0. Enable this only if you use a Geforce 7xxx series or older card, or a Radeon X1xxx series or older card.

#define SMAA_PREDICATION 0 //[0 or 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.01 // Threshold to be used in the depth buffer.

#define SMAA_PREDICATION_SCALE 2.0 // How much to scale the global Threshold used for luma or color edge detection when using predication
#define SMAA_PREDICATION_STRENGTH 0.4 // How much to locally decrease the Threshold.

#define SMAA_DEBUG_OUTPUT 0 //[0 to 4] 0 = Normal, 1 = edgesTex, 2 = blendTex, 3 = areaTex, 4 = searchTex - Only for troubleshooting. Users don't need to mess with this.

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

  • Posts: 6
5 years 4 months ago - 5 years 4 months ago #7 by occiq
Your SMAA added ME works great on Attila total war with MagicDOF and MatsoDOF. Thought, DOF is wasting my GPU :(

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

  • Posts: 136
5 years 4 months ago #8 by jmp909
SMAA "Ultra" is defined as

SMAA_Threshold 0.05
SMAA_MAX_SEARCH_STEPS 32
SMAA_MAX_SEARCH_STEPS_DIAG 16
SMAA_CORNER_ROUNDING 25

(I've also seen 64 used instead of 32)

but I don't know about the other values
forums.guru3d.com/showpost.php?p=4378263&postcount=740
The following user(s) said Thank You: huss93, BrandonHortman

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

  • Posts: 131
5 years 4 months ago #9 by BrandonHortman
This seems to work great with Dragonage Inquisition =D
Thanks! Hopefully this will help me figure out how to add HDR to MFX.

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

  • Posts: 54
5 years 4 months ago #10 by huss93
hey thank you bro please ultra fxaa ?

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

  • Posts: 1221
5 years 4 months ago #11 by Marty McFly
I have a question concerning the "differences orig tweaks" file. Why did you remove the HDR rendering? It's a giant loss of quality when you remove that.

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

  • Posts: 285
5 years 4 months ago - 4 years 9 months ago #12 by brussell

Marty McFly wrote: I have a question concerning the "differences orig tweaks" file. Why did you remove the HDR rendering? It's a giant loss of quality when you remove that.


1. There have been problems when using some effects together, like ca, smaa and grain, Threy interfered in bad way and I haven't found the right pass order to sort this out.. Without the HDR-rendertargets this works well.

2. As I stated here I haven't noticed any differences in quality. Maybe you could post some screenshots, where one can actually see a quality decrease. Most of the time some effects (bloom etc.) just looks slightly different, but not worse, imo.
I'm not a HLSL coder, but isn't the whole difference the rgb8 colorspace on the backbuffer instead of 16bit, which the hdr-textures use? Is there a necessity for more than 16.7 million colors for game rendering? Or am I completely wrong on this?

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

  • Posts: 3747
5 years 4 months ago - 5 years 4 months ago #13 by crosire

brussell wrote: Is there a necessity for more than 16.7 million colors for game rendering? Or am I completely wrong on this?

Usually no, but you can notice color banding in gradients because of missing precision to present smooth transitions between two colors. The far more important thing here is that the textures were saved in a floating point format (marked by the "F" that postfixes "RGBA16F"). This format saves floats (or actually halfs; floats are 32bit in size, halfs are half that size, but still save floating point data and not integers), while the normal ones save normalized integer values. This means a RGBA8 texture can only save values between 0 and 1, whereas RGBA16F can save anything below and above too, which can be very important for bright effects like bloom.
The following user(s) said Thank You: brussell

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

  • Posts: 1221
5 years 4 months ago - 5 years 4 months ago #14 by Marty McFly
Exactly, bloom looks pretty fucked with LDR colorspace. Newest WIP version contains optional HDR mode, 0 is RGBA8, 1 is RGBA16F and 2 is RGBA32F.
The following user(s) said Thank You: Constantine PC, jmp909

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

  • Posts: 272
5 years 4 months ago #15 by robgrab

Marty McFly wrote: Exactly, bloom looks pretty fucked with LDR colorspace. Newest WIP version contains optional HDR mode, 0 is RGBA8, 1 is RGBA16F and 2 is RGBA32F.


Very nice. That way people don't have to make "optimized" versions.

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

  • Posts: 285
5 years 4 months ago - 5 years 4 months ago #16 by brussell
Thanks for clarification Crosire.
Out of curiosity I've tested some scenes (Far Cry2) with bloom with RGBA8 and RGBA16F textures.

Normal game scene:
RGBA8 , RGBA16F
No real difference visible, even when zoomed in.

Menu (with overblown bloom settings):
RGBA8 , RGBA16F
The RGBA16F bloom is more precise on local highlights. For better visibility of color banding I've zoomed to some detail:
RGBA8 , RGBA16F .
Here the color banding with RGBA8 is clearly visible.

So there is definitely a decrease in quality. But for me, personally, the RGBA8 textures are more than sufficent for most gaming situations (unless high quality screenshots are needed or something).
The following user(s) said Thank You: jas01

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

  • Posts: 249
5 years 4 months ago #17 by Constantine PC
Thanks, I get even better performance with this version too.

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