Disabling a stage in a multistage shader ?

I have a fragment shader containing normal & specular map calculations, can I disable the specular factor for examaple without writing a shader without those calculations ?

Well, if you’re writing your own fragment shader, you can do whatever you want. You can do whatever you think is best :wink:

That`s not what i meant…

I have a single shader with all operations.
Lets presume I dont want to apply the specular factor to a poly but I don`t want to make another shader without the specular calculations.
Can I disable the specular calculations from the original shader?

PS:
In doom3 for example you can disable bump mapping or specular and they only have 1 shader with all the operations

Pass a bool to your shader that is set in the application. Use the bool to conditionally call a block of code.