Hey guys! I am new to Godot and have run into a bit of a pickle.
Just to give some background, I want to have interactables in my game. I am using to shaders to give feedback to the user, a highlight shader and outline shader. They can be found from the following URLs:
Item Highlight Shader: https://godotshaders.com/shader/collectable-item-shining-highlight/
Item Outline Shader: https://godotshaders.com/shader/pixel-perfect-outline-shader/
The highlight shader gets shown if the item is interactable, and is replaced with the outline shader when the user hovers their mouse over the item. The following image shows how I am changing the shader during runtime:
The issue I am having is that if I have many instances of an object in my scene (I have not duplicated with CNTRL+D, and instead dragged from file directory), they all share the same shader. For example, if I hover over once instance of an item, then all instances in that scene get the outline effect.
The item in question is a vent screw:
which is used multiple times in a vent cover scene:
The following image shows the shader being applied to all screws:
I have made sure to check the local to scene box for each shader, and the materials for the vent screws:
I have also attempted to make vent screw sub-resources unique:
I have also attempted to apply the "instance" word in my shader variables (I am not entirely sure how this works, I am new to shaders):
If you guys need any more information, I'd be happy to share more. If anyone would prefer to have access to the files then I can attempt to upload those as well. If I have not clarified by problem enough, I will try rephrase and explain it again. Thank you again for your time. I recently swapped from unity to Godot and I am having a lovely time.