how to tell directx to use a shader A instead of shader B
using VC++ & Dx10 & HLSL
If I have 2 shader files loaded which are very similar, how do i tell Directx to render using one shader instead of another?
Thanks for any assistance!
-Velik
I haven't used DX10, but I imagine this applies there as well. You don't set it with the device directly, when using Effects. Instead, when you activate your effect, the required constants are set, and the shaders are set.
int pass, passes;pFX->Begin(&passes);for (pass = 0; pass < passes; pass++){ pFX->BeginPass(pass); // At this point the shaders will be set ...Draw... pFX->EndPass();}pFX->End();
If you are using Effect framework then you want to do what Namethatnobodyelsetook has posted. If you arent using the Effect framework then you will want to use the method that you mentioned in your last post.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement