- Home /
How can I declare instanced properties in ShaderGraph?
Hello!
I updated my project to use ShaderGraph recently because it seems easier to deal with, however, my 2D game has lots of assets that uses the same shader, but with different values. I learned how to optimize shader code that has small changes between materials (like color) using MaterialPropertyBlock and instanced properties, however, I can't do the same using ShaderGraph because it gives a Draw Call Batching fail message saying "Non-instanced properties set for instanced shader." even though my material is using the Enable GPU instancing property.
Does anyone know how to declare a Color property in my ShaderGraph as an instanced property? And can I do the same with textures, assuming that all my textures will have different sizes?
Thanks for the help!