Simple tweaks for FPS boost
- brussell
-
Topic Author
Just encountered two methods to gain a few FPS (this is an understatement, I gained nearly 80 FPS in one scene, doubling the framerate) with ME. Fortunately I've noticed no* differences in quality.
1. Change the texture format from RGBA32F to RGBA8
2. Change MipLevels from 7 to 1
3. see also this post for some additonal tweaks
So it should look like this:
texture texColorHDR1 { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 1; Format = RGBA8;}; //ping
texture texColorHDR2 { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 1; Format = RGBA8;}; //pong
texture texMagicDOF { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 1; Format = RGBA8;};
#if (USE_RAYMARCH_AO == 1)
texture texAO { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 1; Format = RGBA8;};
texture texAO2 { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 1; Format = RGBA8;};
#endif
texture2D texDepth : DEPTH;
texture texBloom1 { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 1; Format = RGBA8;};
texture texBloom2 { Width = BUFFER_WIDTH/2; Height = BUFFER_HEIGHT/2; MipLevels = 1;Format = RGBA8;};
texture texBloom3 { Width = BUFFER_WIDTH/4; Height = BUFFER_HEIGHT/4; MipLevels = 1;Format = RGBA8;};
texture texBloom4 { Width = BUFFER_WIDTH/8; Height = BUFFER_HEIGHT/8; MipLevels = 1;Format = RGBA8;};
texture texBloom5 { Width = BUFFER_WIDTH/16; Height = BUFFER_HEIGHT/16; MipLevels = 1;Format = RGBA8;};
I haven't tested Magic Dof and Raymarch AO with these values. (Edit: seems to work well)
edit:
Example Comparison (look at FPS in upper right corner)
*There may be some decrease in quality for some effects, but it's barely visible most of the time. For better dof-quality set texColorHDR2 to RGBA16 (litte fps drain). (See this post )
Please Log in or Create an account to join the conversation.
- Constantine PC
-
Master effect used to cut my framerate almost in half and now i'm seeing a 5 frame loss now which is very good.
it's only about a 6.xx percent slowdown now so it's pretty good. Maybe there are some other tweaks similar to this?
I haven't tested Raymarch AO or Magic DOF. But I don't use those for anything any ways.
Thanks.
Please Log in or Create an account to join the conversation.
- SiriusHours
-
- SunBroDave
-
Please Log in or Create an account to join the conversation.
- crosire
-
Please Log in or Create an account to join the conversation.
- vfxninjaeditor
-
Please Log in or Create an account to join the conversation.
- brussell
-
Topic Author
crosire wrote: Note that this destroys MasterEffect's bloom, most other things should work fine though
I wouldn't speak of "destroying", just minor changes. The example scene would look totally different without the bloom.
Please Log in or Create an account to join the conversation.
- crosire
-
Those mipevels on the other hand are required for the Magic DOF algorithm to work, same is true for the chapman lensflare, so disabling them probably means those will no longer work right.
Please Log in or Create an account to join the conversation.
- brussell
-
Topic Author
Standard settings:
i.imgur.com/Tfy4xEf.jpg
All textures set to MipLevel 1
i.imgur.com/MBGWcRe.jpg
texMagicDof and texAO,texAO2 set to RGBA8
i.imgur.com/MVrO5t7.jpg
All textures set to RGBA8 (so the remaining texColorHDR1 and texColorHDR2)
i.imgur.com/iGvE2Zi.jpg
texColorHDR2 set to RGBA16
i.imgur.com/My7bj3a.jpg
Conclusion (imho):
Setting texColorHDR2 to RGBA8 changes the quality of magic dof. It looks a bit more blurry and misaligned, but it works. Set to RGBA16 it looks like the original RGBA32F, but with more fps of course.
All other settings have no impact on the image (at least for this scene).
Please Log in or Create an account to join the conversation.
- calafate
-
With a R7 260x 2GB i couldn´t use the Master Effects on modern games due the loss of huge performance, even if all of the effects were turned off. I have made some testing with this trick and the performance improved vastly. I dont really care if DoF or AO looks sightly worse, the huge performance gain is enough for me to use it now.
Many thanks

Please Log in or Create an account to join the conversation.
- Nekrik
-
Please Log in or Create an account to join the conversation.
- brussell
-
Topic Author
Nekrik wrote: Also from my tests setting the "texColorHDR1" and "texColorHDR2" mips levels from 7 to 1 had no impact on neither FPS nor IQ, so kept them on 7!
I did a quick test on this again with Dawn of War (Effects used: filmic pass, reinhard linear, sharpen; the values in parentheses are with extra bloom,ao,dof):
MipLevel 7: 258 fps (47 fps)
MipLevel 1: 400 fps (53 fps)
So it definitely has an impact on the framerate. Maybe there are other reasons why it doesn't have an influence for you.
Please Log in or Create an account to join the conversation.
- crosire
-
Please Log in or Create an account to join the conversation.
- brussell
-
Topic Author
Since I don't know if Marty would approve this, instead of uploading a tweaked Reshade.fx I simply lay out the changes I made.
Steps (for replacing i suggest the find/replace functionality of your editor):
-delete the two "texture texColorHDR* {...};" declarations
-delete the two "sampler SamplerColorHDR* {...};" declarations
-replace "texColorHDR1", "texColorHDR2" with "texColor"
-replace "SamplerColorLDR","SamplerColorHDR1","SamplerColorHDR2" with "SamplerColor"
-replace "RenderTarget = texColor;" with "" (aka Nothing)
-delete all the "EmptyHDR*{...}" passes in the techniques section
-optional (no fps gain, just tidying): delete unnecessary functions: "EmptyPassHDR*{...}"
Additionally you could merge some of the passes (I've done this with a config where I use only few effects), but the performance gain would be marginal. More tweaking would require advanced HLSL knowledge, that I don't have yet.

edit: fixed some instructions
Please Log in or Create an account to join the conversation.
- Iddqd
-

Here link with all performance tweaks: www.dropbox.com/s/0ppzxekkw9k5w9r/Master..._with_fixes.zip?dl=0
Please Log in or Create an account to join the conversation.
- Quentin-Tarantino
-

Please Log in or Create an account to join the conversation.
- Alfredxx
-
Please send me your Reshade.FX.datei thanks..
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.
- Marty McFly
-
There are no place filler passes anymore, no useless mipmaps, and so on.
Also some textures cannot be downgraded in their bit depth, see why in my last post on this page:
reshade.me/forum/shader-presentation/161...ial-thread?start=534
Forcing RGBA8 on the occlusion textures results in horrible artifacts.
Please Log in or Create an account to join the conversation.