Skip to main content
GameDev.net gamedev.net
🔒 Locked

Question about effect

Started by 6666662000 Apr 5, 2006 at 10:25 PM 2 replies 1k views
Original Post
6666662000
6666662000
In the SDK it is said that ID3DXBaseEffect::SetMatrixArray passed an array of nontransposed matrix.Did it means the effect will transpose matrix automatically.And then vertex shader will get the transposed matrix correctly?
axon
axon
Don't know... why not simply enable shader debugging and put a breakpoint in the shader code to see the value of the matrix there.
6666662000
6666662000
Another accident comes after this.I've got a shader compile error as below:
(403):error X4004:program too complex; there are more active values than registers, when I enabled shader debuging.The release version is OK.
Is there any limit about the .fx file line count?
jollyjeffers
jollyjeffers
Quote:
Original post by 6666662000
Another accident comes after this.I've got a shader compile error as below:
(403):error X4004:program too complex; there are more active values than registers, when I enabled shader debuging.
Debug builds of FX/shaders don't tend to optimize the shaders in the same way that a release build does...

Quote:
Original post by 6666662000
Is there any limit about the .fx file line count?
No limit for the FX file, but the same shader limits apply as with non-FX based effects. For example, ps_2_0 only supports 64 arithmetic and 32 texture operations.

In your case it's probably complaining about register pressure. Each shader model has a number of temporary registers available to it - and whatever expression it's pointing to probably has more intermediary values than can be stored in the available registers. It's a bit tricky to explain - but if you read up on expression parsing you should get a rough idea of how a complex expression is broken down into many simpler ones.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.