View Full Version : Disabling a stage in a multistage shader ?
08-22-2005, 01:09 PM
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 ;)
08-26-2005, 07:29 AM
That`s not what i meant...
I have a single shader with all operations.
Let`s presume I don`t 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?
In doom3 for example you can disable bump mapping or specular and they only have 1 shader with all the operations
08-26-2005, 07:43 AM
Pass a bool to your shader that is set in the application. Use the bool to conditionally call a block of code.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.