• Advertisement
Sign in to follow this  

EffectPass.Apply Performance

This topic is 3384 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

Hi I was profiling my application and I was noticed that I'm spending 40% of the render time in the EffectPass.Apply method. I only have one or two different shaders, so it insane to always call the EffectPass.Apply method for each object that I'm rendering. Unfortunatly by not calling this method, I'm also *not* committing the world matrix to the shader. Is their another way to accomplish this? If I look at "pix for windows" the blendstate, buffers, samplers, shaders are all set. I assume that this is taking a lot of time. What would be a more appropriate way to commit the changes of the variables? kind regards Alexander

Share this post


Link to post
Share on other sites
Advertisement
If you don't want to keep calling Apply you can call CommitChanges, which will cause the Effect to propagate your changes to the world matrix parameter.

Share this post


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

  • Advertisement