Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualbonus.2113

Posted 25 February 2012 - 01:07 PM

First of all, drop from 2500 to 1000 isn't that big. Fps is a bad measure of performance. Instead calculate the frame time ie. 1.0f / fps and use that as a reference for evaluating performance.


I tested it on my laptop and there the frametime goes from ~7 ms(150 fps) up to ~20 ms(50 fps), and that's quite alot. Also, shouldn't be saying "The framerate is 2.5 times less" be the same as "the frametime is 2.5 times higher"? Aren't frametime and framrate the same measurement just in different units? (I understand that the framerate values can be misleading when you think in pure numbers, as the difference between 2000 fps and 2100 is way less than 100 and 200)

- do all your lights affect the whole screen? if not, do not draw a full screen quad, just a quad covering all the pixels of a light


I thought about that, but I guessed that it is better to find out if there is a core problem in the way I'm currently doing it before I start to try to optimize anything.

- is it possible to draw all your lights in 1 draw call? Ie. loop through your all affecting lights for each pixel. This way you can draw pretty many lights with a single full screen quad.


I'm currently using shader model 2.0 so, as far as I know, the number of lights in one pass would be really limited. I could reduce the number of passes though.


Are you sure its not because theres branching in your shader?


Yeah, I'm pretty sure, because it was just as slow when I returned black straight away.

#2bonus.2113

Posted 25 February 2012 - 01:06 PM

First of all, drop from 2500 to 1000 isn't that big. Fps is a bad measure of performance. Instead calculate the frame time ie. 1.0f / fps and use that as a reference for evaluating performance.


I tested it on my laptop and there the frametime goes from ~7 ms(150 fps) up to ~20 ms(50 fps), and that's quite alot. Also, shouldn't be saying "The framerate is 2.5 times less" be the same as "the frametime is 2.5 times higher"? Aren't frametime and framrate the same measurement just in different units? (I understand that the framerate values can be misleading when you think in pure numbers, as the difference betweeb 2000 fps and 2100 is way less than 100 and 200)

- do all your lights affect the whole screen? if not, do not draw a full screen quad, just a quad covering all the pixels of a light


I thought about that, but I guessed that it is better to find out if there is a core problem in the way I'm currently doing it before I start to try to optimize anything.

- is it possible to draw all your lights in 1 draw call? Ie. loop through your all affecting lights for each pixel. This way you can draw pretty many lights with a single full screen quad.


I'm currently using shader model 2.0 so, as far as I know, the number of lights in one pass would be really limited. I could reduce the number of passes though.


Are you sure its not because theres branching in your shader?


Yeah, I'm pretty sure, because it was just as slow when I returned black straight away.

#1bonus.2113

Posted 25 February 2012 - 01:06 PM

First of all, drop from 2500 to 1000 isn't that big. Fps is a bad measure of performance. Instead calculate the frame time ie. 1.0f / fps and use that as a reference for evaluating performance.


I tested it on my laptop and there the frametime goes from ~7 ms(150 fps) up to ~20 ms(50 fps), and that's quite alot. Also, shouldn't be saying "The framerate is 2.5 times less" be the same as "the frametime is 2.5 times higher"? Aren't frametime and framrate the same measurement just in different units? (I understand that the framerate values can be misleading when you think in pure numbers, as the difference of 2000 fps and 2100 is way less than 100 and 200)

- do all your lights affect the whole screen? if not, do not draw a full screen quad, just a quad covering all the pixels of a light


I thought about that, but I guessed that it is better to find out if there is a core problem in the way I'm currently doing it before I start to try to optimize anything.

- is it possible to draw all your lights in 1 draw call? Ie. loop through your all affecting lights for each pixel. This way you can draw pretty many lights with a single full screen quad.


I'm currently using shader model 2.0 so, as far as I know, the number of lights in one pass would be really limited. I could reduce the number of passes though.


Are you sure its not because theres branching in your shader?


Yeah, I'm pretty sure, because it was just as slow when I returned black straight away.

PARTNERS