(for pre1.1 MER) MER with SMAA (unofficial)
- brussell
- Topic Author
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
Please Log in or Create an account to join the conversation.
- jas01
Please Log in or Create an account to join the conversation.
- huss93
Please Log in or Create an account to join the conversation.
- huss93
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.
- brussell
- Topic Author
Please Log in or Create an account to join the conversation.
- huss93
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.
- occiq
Please Log in or Create an account to join the conversation.
- jmp909
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
Please Log in or Create an account to join the conversation.
- BrandonHortman
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.
- huss93
Please Log in or Create an account to join the conversation.
- Marty McFly
Please Log in or Create an account to join the conversation.
- brussell
- Topic Author
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.
- crosire
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.brussell wrote: 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.
- Marty McFly
Please Log in or Create an account to join the conversation.
- 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.
- brussell
- Topic Author
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).
Please Log in or Create an account to join the conversation.
- Constantine PC
Please Log in or Create an account to join the conversation.