- Home /
Using PBR shader and dynamically switching values
Kind of in a rough patch here. Upgrading our product configurator to unity 5 and using PBR shaders and I seemed to have run into a snag here. Models load in dynamically from our servers using that OBJReader plugin (which works great and fast!) and then I check to see if the texture has some transparency on it and if it does, then it sets its PBR render mode to cutoff.
Now after I set it to cutoff via code, it doesn't seem to update the fact that its cutoff at all during the runtime. I have to go in the scene view and manually update the shader (I usually slide the cutoff slider and it does the trick) in the inspector and it will finally include the cutoff. At first I thought I may have it being set somewhere else that would cancel the fact I tried to set its cutoff to a specific value. But that wasn't the case as I made a test script that would update it and the values updated and moved around but yet it didn't show any cutoff!
Is there something preventing the PBR shader from updating at runtime? Or is this some sort of bug?
Thanks! -Nick
Your answer
Follow this Question
Related Questions
Inverting the cutoff property (UI bar) 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Triggering timed dissolve in shader graph via a C# coroutine 2 Answers
No shadows when building with WebGL? 1 Answer