EffectPass.Apply Performance

Started by
2 comments, last by Guthur 15 years, 3 months ago
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
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.
It looks like this is no longer available in D3D 10.

Maybe I should have mentioned this before :)

kind regards

Alexander
Look into this ID3D10EffectPass::ComputeStateBlockMask, seems like it might help.
Innovation not reiterationIf at any point I look as if I know what I'm doing don't worry it was probably an accident.

This topic is closed to new replies.

Advertisement