I want to use a custom shader for UITexture so I have done some experiments but I can't never get it to work properly.
The test I have done is using shader from the NGUI itself, just copy pasted into different file and then changing its shader name. ( I know how shader works and so the shader itself is working)
I used the transparent 2 for clipping, but this is what happens.
If I assign test shader to the shader option, and just link its maintexture by API script, it does show the texture, but with no clipping, and it just seems to be using the default one that NGUI is using, because no matter what I do to the shader code, it doesn't change at all. This is also true when I restart the game completely.
So for example if I let shader to out put 0 , for extreme testing, it doesn't... it still shows my texture itself. This is why I believe that NGUI is not using the shader I have told it to.
I have also tried to use material instead, but the same thing happens.
I have gone through forum and found something about dynamicMaterial.. is this something I have to tap into? I don't need to modify the material on the fly.. I just want it to use my custom shader (for example invert)
I don't mind draw calls and all that because there is only one of this widget in the UI.
Any ideas? I think I am using NGUI version 3.7 something.. last year Aug something like that... Not sure.. how do I check for the version number? I would also like to not update NGUI this time, because the project is closed and I don't want to introduce any possible changes other than the one that I am trying to do.
Thanks!