![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | tshrpl |
hi, i’m having trouble changing the shader parameter from gdscript. i know this might be a silly question but it is a huge headache for me, so i’m asking it here
here are my scenes
- container:
the stars node has a script attached which has the following code
func _ready():
for i in range(10):
var instance = star_scene.instance()
add_child(instance)
- star:
the star node has a script attached which has the following line in the _ready function
the texturerect node has a material setup like this
the star.shader file just has this
void fragment() {
COLOR.rgb = col.rgb;
}
when i run the game, all star nodes have the same color, i want them to have separate color
i have made the shadermaterial unique, still the problem persists