Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Transparent material flag, systematic material regeneration issue? #23
Currently to change the opacity of a material it must initially start at something less than 1.0, such as opacity 0.999, if the opacity is changed the shader does not adapt to support it. This will require a flag check or bitmask to re-initialize the shader when alpha conditions have changed.
This however might attest to a more systematic problem of the lack of a material 'dirty' flag. The ideal here might be to add a general flag to the material to force it to flush it's pool cache and regenerate or reassign on the next draw.
sure, it should mostly just involve adding a function to the Material that will clear out it's local copy of the shaders from the global pool -- that should cause them to rebuild.
more interestingly the transparency and blending setup is mostly untested for correctness -- if you want to try and make use of transparencies in various conditions and find the issues there that would certainly help.