have problem when using "dynamic looping" in pixel shader.

how many limitations or difference with C++ when using "dynamic looping" in pixel shader?

[106 byte] By [braveocean] at [2007-12-23]
# 1

There are quite a lot of differences. Ultimately it boils down to the underlying architecture - CPU vs GPU and in general GPU's tend to prefer static/linear execution. Looping and branching tend to hurt parallelism.

Then again, the above depends on which shader model(s) you're using and on what sort of hardware. From what I gather ATI's R500 series hardware is quite good at branching/looping whereas other SM3 parts (e.g. Nvidia's 6/7-series) aren't quite so good.

Have a look at the SDK documentation for further details:

Pixel Shader Differences,

Flow-Control Limitations,

SM1 models don't tend to be good for this sort of thing, ps_2_0 is better, ps_2_x has more and ps_3_0 is about as good as it currently gets. D3D10's SM4 is pretty good, but you'll have to dig into the offline help files for more info.

hth
Jack

JackHoxley at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...