Jump to content
  • Advertisement
Sign in to follow this  
6666662000

Question about effect

This topic is 4609 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!