Simple tweaks for FPS boost

  • brussell
  • Topic Author
More
9 years 2 months ago - 8 years 5 months ago #1 by brussell Simple tweaks for FPS boost was created by brussell
Note: These tweaks are mainly for pre1.1 MER. With MER 1.1 you can now choose between RGBA8, RGBA16F and RGBA32F textures. However, the tweaks under point 3 can still be applied.


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 )
Last edit: 8 years 5 months ago by crosire. Reason: Fixed link
The following user(s) said Thank You: SunBroDave, Constantine PC, jas01, piterrrxd

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

  • Constantine PC
More
9 years 2 months ago #2 by Constantine PC Replied by Constantine PC on topic Simple tweaks for FPS boost
I just want to say this 100% worked for me too.
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
More
9 years 2 months ago #3 by SiriusHours Replied by SiriusHours on topic Simple tweaks for FPS boost
words thanks for the info

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

  • SunBroDave
More
9 years 2 months ago #4 by SunBroDave Replied by SunBroDave on topic Simple tweaks for FPS boost
I'm sure that people w better eyes than mine will more notice the drop in quality, but totally, this seems like a good compromise between improving a games IQ and preserving performance. Especially when playing 2014-2015 games on aging hardware

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

  • crosire
More
9 years 2 months ago - 9 years 2 months ago #5 by crosire Replied by crosire on topic Simple tweaks for FPS boost
Edit: Nevermind.
Last edit: 9 years 2 months ago by crosire.

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

  • vfxninjaeditor
More
9 years 2 months ago #6 by vfxninjaeditor Replied by vfxninjaeditor on topic Simple tweaks for FPS boost
How does it destroy ME's bloom? I personally didn't notice any change.

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

  • brussell
  • Topic Author
More
9 years 2 months ago - 9 years 2 months ago #7 by brussell Replied by brussell on topic Simple tweaks for FPS boost

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.
Last edit: 9 years 2 months ago by brussell.

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

  • crosire
More
9 years 2 months ago - 9 years 2 months ago #8 by crosire Replied by crosire on topic Simple tweaks for FPS boost
Oh, sorry, I didn't mean bloom, I meant DOF. Turning down the precision for the bloom textures does decrease quality a little bit (introduces banding issues), but as you noted, it's minor.
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.
Last edit: 9 years 2 months ago by crosire.

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

  • brussell
  • Topic Author
More
9 years 2 months ago - 9 years 2 months ago #9 by brussell Replied by brussell on topic Simple tweaks for FPS boost
I've tested the settings in detail with one scene (Raymarch AO and Magic Dof enabled):

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).
Last edit: 9 years 2 months ago by brussell.
The following user(s) said Thank You: SunBroDave, Nekrik, jas01

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

  • calafate
More
9 years 2 months ago - 9 years 2 months ago #10 by calafate Replied by calafate on topic Simple tweaks for FPS boost
Thanks for the info.

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 :)
Last edit: 9 years 2 months ago by calafate.

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

  • Nekrik
More
9 years 2 months ago - 9 years 2 months ago #11 by Nekrik Replied by Nekrik on topic Simple tweaks for FPS boost
I concur that. Made myself some tests on "Remember Me" with texture "texColorHDR1" and "texColorHDR2" set to RGBA16 instead of RGBA32F and gained about 15 fps with absolutely no IQ loss. I don't use Magic DOF nor Raymarch AO though so didn't touch those settings. 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!
Last edit: 9 years 2 months ago by Nekrik.

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

  • brussell
  • Topic Author
More
9 years 2 months ago #12 by brussell Replied by brussell on topic Simple tweaks for FPS boost

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
More
9 years 2 months ago #13 by crosire Replied by crosire on topic Simple tweaks for FPS boost
Enabling mipmapping on rendertargets forces ReShade to recalculate them after each pass, which is an expensive operation, so yes, it should really have an impact on performance.

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

  • brussell
  • Topic Author
More
9 years 2 months ago - 9 years 2 months ago #14 by brussell Replied by brussell on topic Simple tweaks for FPS boost
I was to able to get even more fps out of ME (ca. 5%). Essentially we abandon those HDR samplers with the corresponding EmptyHDR passes. Afaik there is no visible quality loss.
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. :P

edit: fixed some instructions
Last edit: 9 years 2 months ago by brussell.
The following user(s) said Thank You: Wicked Sick, calafate, Quentin-Tarantino, Constantine PC, jas01

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

  • Iddqd
More
9 years 2 months ago #15 by Iddqd Replied by Iddqd on topic Simple tweaks for FPS boost
SamplerColor not defined in last MasterEffect version :)
Here link with all performance tweaks: www.dropbox.com/s/0ppzxekkw9k5w9r/Master..._with_fixes.zip?dl=0
The following user(s) said Thank You: CryZENx, Quentin-Tarantino, Constantine PC

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

  • Quentin-Tarantino
More
9 years 1 month ago #16 by Quentin-Tarantino Replied by Quentin-Tarantino on topic Simple tweaks for FPS boost
Thanks mate it helped a lot :)

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

  • Alfredxx
More
8 years 9 months ago #17 by Alfredxx Replied by Alfredxx on topic Simple tweaks for FPS boost
Hi I rename the lines but I sea not FPS boost for me please help!!!!

Please send me your Reshade.FX.datei thanks..

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

  • brussell
  • Topic Author
More
8 years 9 months ago - 8 years 9 months ago #18 by brussell Replied by brussell on topic Simple tweaks for FPS boost
Alfredxx, the tweaks are mostly obsolete now. Just use the latest MasterEffect release or the ReShade Framework.
Last edit: 8 years 9 months ago by brussell.

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

  • Marty McFly
More
8 years 9 months ago - 8 years 5 months ago #19 by Marty McFly Replied by Marty McFly on topic Simple tweaks for FPS boost
The fixes of this version are obsolete, I optimized the performance as much as possible without breaking anything.
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.
Last edit: 8 years 5 months ago by crosire. Reason: Fixed link
The following user(s) said Thank You: Wicked Sick, jas01

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.