Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How does shader performance relate to complexity and task count?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Veil   Members   

143
Like
0Likes
Like

Posted 29 May 2012 - 05:43 PM

For instance,without any shaders passing,I can render models made of thousands of polys at 800 fps and maybe of millions at 200-300 FPS,but if I use a simple shader of any kind on a simple mesh,it causes a noticeable FPS drop(from 1000 to 700).Then if I use a more complex shader,like one that calculates multiple lights,the framerate drops to 500,so it's not a linear decrease,but is there a way to exactly compare shader performances without having to compile the whole solution?Like maybe an HSLS -> ASM converter that would allow me to see the instruction counts?

#2 MJP   Moderators   

19429
Like
4Likes
Like

Posted 29 May 2012 - 05:53 PM

Framerate is not linear, so you shouldn't use it to determine performance impact. Going from 1000 to 700 fps is equivalent to adding ~0.4ms of frame time, while going from 700 to 500fps is equivalent to adding ~0.6ms of frame time.

AMD has GPU ShaderAnalayzer which can convert your HLSL to actual hardware-specific microcode (not D3D shader assembly, which is just an intermediate format) and can give you cycle counts for the shader. But overall performance at runtime is still going to vary based on a lot of things, such as how many pixels you shade or what else is currently executing on the GPU.

Edited by MJP, 29 May 2012 - 05:53 PM.


#3 Veil   Members   

143
Like
0Likes
Like

Posted 29 May 2012 - 05:58 PM

Framerate is not linear, so you shouldn't use it to determine performance impact. Going from 1000 to 700 fps is equivalent to adding ~0.4ms of frame time, while going from 700 to 500fps is equivalent to adding ~0.6ms of frame time.

AMD has GPU ShaderAnalayzer which can convert your HLSL to actual hardware-specific microcode (not D3D shader assembly, which is just an intermediate format) and can give you cycle counts for the shader. But overall performance at runtime is still going to vary based on a lot of things, such as how many pixels you shade or what else is currently executing on the GPU.


Exactly what I was looking for,thanks.I was planning to use a parallax normal mapping on every object in my game,so I was curious at how heavy the technique actually is.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.