#I cannot seem to have a Unique texture per Material from a shader graph. Works then does not.

1 messages · Page 1 of 1 (latest)

lavish prism
#

I'm really struggling with a issue where my material does not hold a unique instance per material im using a texture for my baked blender ambient occlusion map. Im using a Texture2D exposed to the editor, the scope is per material. GPU instancing is off. This worked before i restarted unity today. Everything was fine.
Whenever i change the 2dTexture in the editor on one material it changes it for all objects in the scene using this material >< In fact I'm noticing all exposed variables are now shared across all objects with the same material. How do i make them unique per object?
Thanks so much for the help.

terse galleon
lavish prism
#

If i assign different materials, i have 200 world tiles per level, and 20 levels, thats alot of materials would that be normal? I mean the unique map per object was working before i dont know what changed : (

#

Is there no way to have the same material but with different values per instance of the material?

#
        void Start()
        {
            Renderer renderer = GetComponent<Renderer>();
            
            Texture2D uniqueTexture = texture;
            
            MaterialPropertyBlock block = new MaterialPropertyBlock();
            renderer.GetPropertyBlock(block);

            block.SetTexture("_AOMap", uniqueTexture);
            renderer.SetPropertyBlock(block);
        }```
Material block works. hmm
#

So strange this is not an option in shader graph? This is what i think im missing or something

#

So i really dont want to use this way is my object is an enttiy and not a gameobject, so ide would be nice to do it through the shader ><

terse galleon
lavish prism
#

Thanks : )

lavish prism
#

Ok this does not work for 2DTexture. Nvm.

lavish prism
#

There must be a way to change the 2DTexture within entities/dots per material instance?