- Home /
Question by
BearShark1993 · May 04, 2016 at 08:04 PM ·
shadersmaterialstrees
Accessing Speed tree Material properties
I was wondering if anyone knows where I can access the speed tree shader source code so I can figure out the name of its texture variables. I want to be able to swap out leaf textures of varying colors via script instead of loading in multiple versions of the tree model since I am not sure how many variations I am gonna use. My hope is use the material.setTexture() method to achieve this.
Comment
Best Answer
Answer by BearShark1993 · May 05, 2016 at 06:51 AM
I ended up realizing there is a main color parameter for the speed tree shader for leaves. Its a lot easier to adjust that using Material.getColor than swapping textures. You can access it using the standard string "_Color" as input to the getColor method.