Railgun CVars for Better Performance

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Railgun CVars for Better Performance

Re: Railgun CVars for Better Performance

by Spleen » Fri Dec 26, 2008 8:27 am

Enjay wrote:You said that the problem was mainly in GZdoom. In GZdoom, there are a few (3 I think) options for how to render particles. Do these make any difference to the frame rate drop?
It only makes a slight difference. The slowest are the smooth ones, squares are in the middle, and the fastest are the round ones, but only about 10-20% faster than the smooth ones. I should actually try this modified railgun in GZDoom and see if I get the performance increase of several fold that I'm expecting :P Unfortunately I don't have a slow computer to test ZDoom software mode with.


edit: I made an improved version which solves Edward's issue and allows you to control rail and trail sparsity seperately

r_rail_smartspiral - set to 1 to turn off spiral ONLY if there is no inner trail (that is, if inner trail color == -1) - this solves Edward's complaint =P (default 0)
r_rail_spiralsparsity - 0 or below turns off spiral, otherwise controls just spiral sparsity (default 1)
r_rail_trailsparsity - 0 or below turns off trail, otherwise controls just trail sparsity (default 1)

Set spiral sparsity to 2 and trail sparsity to 4 for better performance without it looking reallly bad. :ugeek:
Attachments
p_effect.cpp
(17.05 KiB) Downloaded 41 times

Re: Railgun CVars for Better Performance

by Enjay » Fri Dec 26, 2008 7:20 am

Spleen wrote:What kind of rail shot would have only an outside spiral??
I'm pretty sure that it is possible to set it up that way, and I'm even pretty sure I've seen mods use it that way. Just because it's called a railgun, it doesn't mean it has to be getting used as a railgun. It could be for a magical attack or whatever. ;)

As an aside, I'm still quite surprised that the railgun makes such a difference to frame rate. You said that the problem was mainly in GZdoom. In GZdoom, there are a few (3 I think) options for how to render particles. Do these make any difference to the frame rate drop?

Re: Railgun CVars for Better Performance

by Spleen » Fri Dec 26, 2008 4:08 am

edward850 wrote:
Spleen wrote:-r_rail_spiral
Problem. If the rail shot was made to only have an outside spiral, this (set to true) will make the shot invisible.
What kind of rail shot would have only an outside spiral??

But I can try to add in an r_rail_spiral 2 option which disables the outer spiral only if there is an inner rail to be drawn.

Re: Railgun CVars for Better Performance

by edward850 » Fri Dec 26, 2008 3:35 am

Spleen wrote:-r_rail_spiral
Problem. If the rail shot was made to only have an outside spiral, this (set to true) will make the shot invisible.

Re: Railgun CVars for Better Performance

by Spleen » Mon Dec 22, 2008 5:20 pm

bagheadspidey wrote:
Spleen wrote:Imagine laptop people with integrated graphics! :D
<_<
???



Enjay wrote:It's a real shame that Intel persist with, and is getting away with, making those shoddy, sub-standard integrated graphics chips that seem to come with most laptops. I'm surprised there hasn't been more pressure put on them to improve. I guess most laptop owners don't care enough about that kind of graphics performance for it to be a big enough issue to make Intel change. :shrug:
Dedicated graphics produce more heat, so I'm not really surprised, considering fans take up space and weight and many laptops are already prone to overheating.

Anyways what exists in terms of hardware is what exists, and these 2 addition to the code are there to help these people have a more playable experience (lowering the resolution doesn't always help too much with particle spam frame rate drops in GL mode, dunno about software).

Re: Railgun CVars for Better Performance

by Enjay » Mon Dec 22, 2008 4:56 pm

It's a real shame that Intel persist with, and is getting away with, making those shoddy, sub-standard integrated graphics chips that seem to come with most laptops. I'm surprised there hasn't been more pressure put on them to improve. I guess most laptop owners don't care enough about that kind of graphics performance for it to be a big enough issue to make Intel change. :shrug:

Re: Railgun CVars for Better Performance

by bagheadspidey » Mon Dec 22, 2008 2:41 pm

Spleen wrote:Imagine laptop people with integrated graphics! :D
<_<

Re: Railgun CVars for Better Performance

by Spleen » Mon Dec 22, 2008 10:51 am

Graf Zahl wrote:Only on really, really old computers... :mrgreen:
And laptops :P My computer is a 1.5 year old laptop with a discrete graphics card, and my FPS drops if railgun shots are being spammed (in the GL renderer). Imagine laptop people with integrated graphics! :D

Re: Railgun CVars for Better Performance

by Graf Zahl » Mon Dec 22, 2008 10:49 am

Only on really, really old computers... :mrgreen:

Re: Railgun CVars for Better Performance

by Spleen » Mon Dec 22, 2008 10:49 am

Cutmanmike wrote:
Spleen wrote:-r_rail_spiral - Toggles the railgun spiral. Default is "true", and "false" forces the outer spiral off to improve performance.
Is that true? I didn't think it would have any performance nags.
Forcing it off will greatly decrease the number of particles, so I assume it would improve performance.. :? Also it looks less ugly without the spiral if you set the sparsity to say, 6 :P

Re: Railgun CVars for Better Performance

by Cutmanmike » Mon Dec 22, 2008 10:47 am

Spleen wrote:-r_rail_spiral - Toggles the railgun spiral. Default is "true", and "false" forces the outer spiral off to improve performance.
Is that true? I didn't think it would have any performance nags.

Railgun CVars for Better Performance

by Spleen » Mon Dec 22, 2008 10:44 am

Hi everyone, this is my first code submission, so please don't murder me if I did something wrong! I will be happy to go back and fix it if I did.

I added 2 cvars for the rails (shot by both humans and monsters) to improve performance for people who are experiencing large frame rate drops when rail shots are spammed. This happens a lot in GZDoom's GL renderer but I am guessing it would also happen for people with old computers who are playing with the software renderer, so I submitted it here and not there.

-r_rail_sparsity - Increases the "sparsity" or decreases the density of the rail particles, the higher you set this. This works like a quotient, so 2 will halve, 3 will divide the amount of particles by three, and so on. Default is 1, and values below 0 do nothing. The spiral starts looking ugly if you have this set to 4 or higher, but you can turn it off :) However a value of 2 won't change the appearance too much, but will probably double performance =P
-r_rail_spiral - Toggles the railgun spiral. Default is "true", and "false" forces the outer spiral off to improve performance.

Only p_effect.cpp is modified by this change.


[edit: Oh yes and I forgot to mention that this will allow you to see more railgun shots with the same amount of maxparticles!]


[edit: updated! look at last post!]

Top