Welcome, Guest.
Username: Password: Remember me

TOPIC: Simple tweaks for FPS boost

Simple tweaks for FPS boost 1 year 9 months ago #1

  • brussell
  • brussell's Avatar
  • Offline
  • Posts: 139
  • Thank you received: 113
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: 1 year 1 month ago by crosire. Reason: Fixed link
The administrator has disabled public write access.
The following user(s) said Thank You: SunBroDave, Constantine PC, jas01, piterrrxd

Simple tweaks for FPS boost 1 year 9 months ago #2

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.
I'm always learning.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #3

words thanks for the info
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #4

  • SunBroDave
  • SunBroDave's Avatar
  • Offline
  • Posts: 202
  • Thank you received: 174
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
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #5

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1392
Edit: Nevermind.
Cheers, crosire =)
Last Edit: 1 year 9 months ago by crosire.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #6

How does it destroy ME's bloom? I personally didn't notice any change.


Witanlore: Dreamtime
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #7

  • brussell
  • brussell's Avatar
  • Offline
  • Posts: 139
  • Thank you received: 113
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: 1 year 9 months ago by brussell.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #8

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1392
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.
Cheers, crosire =)
Last Edit: 1 year 9 months ago by crosire.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #9

  • brussell
  • brussell's Avatar
  • Offline
  • Posts: 139
  • Thank you received: 113
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: 1 year 9 months ago by brussell.
The administrator has disabled public write access.
The following user(s) said Thank You: SunBroDave, Nekrik, jas01

Simple tweaks for FPS boost 1 year 9 months ago #10

  • calafate
  • calafate's Avatar
  • Offline
  • Posts: 10
  • Thank you received: 6
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: 1 year 9 months ago by calafate.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #11

  • Nekrik
  • Nekrik's Avatar
  • Offline
  • Posts: 58
  • Thank you received: 29
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: 1 year 9 months ago by Nekrik.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #12

  • brussell
  • brussell's Avatar
  • Offline
  • Posts: 139
  • Thank you received: 113
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.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #13

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1392
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.
Cheers, crosire =)
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 9 months ago #14

  • brussell
  • brussell's Avatar
  • Offline
  • Posts: 139
  • Thank you received: 113
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: 1 year 9 months ago by brussell.
The administrator has disabled public write access.
The following user(s) said Thank You: Wicked Sick, calafate, Quentin-Tarantino, Constantine PC, jas01

Simple tweaks for FPS boost 1 year 9 months ago #15

  • Iddqd
  • Iddqd's Avatar
  • Offline
  • Posts: 30
  • Thank you received: 22
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 administrator has disabled public write access.
The following user(s) said Thank You: CryZENx, Quentin-Tarantino, Constantine PC

Simple tweaks for FPS boost 1 year 9 months ago #16

  • Quentin-Tarantino
  • Quentin-Tarantino's Avatar
  • Offline
  • If there is no struggle, there is no progress.
  • Posts: 351
  • Thank you received: 218
Thanks mate it helped a lot :)
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 5 months ago #17

Hi I rename the lines but I sea not FPS boost for me please help!!!!

Please send me your Reshade.FX.datei thanks..
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 5 months ago #18

  • brussell
  • brussell's Avatar
  • Offline
  • Posts: 139
  • Thank you received: 113
Alfredxx, the tweaks are mostly obsolete now. Just use the latest MasterEffect release or the ReShade Framework.
Last Edit: 1 year 5 months ago by brussell.
The administrator has disabled public write access.

Simple tweaks for FPS boost 1 year 5 months ago #19

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 610
  • Thank you received: 720
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: 1 year 1 month ago by crosire. Reason: Fixed link
The administrator has disabled public write access.
The following user(s) said Thank You: Wicked Sick, jas01