I have a simple geometry node setup, where I instance objects on a mesh line. My issue is that the shader is exactly the same in all instances. My question is would it be possible to randomize it somehow?
It seems likely in your case that it would be more economical, and simpler, not to realize the instances in the GN tree?..
If so, at its simplest,you can store the index as a named attribute on instances:
..and let the shader do what it will, with the per-instance number, calling it up as an 'Instancer' attribute:
Here, the instance-index is used to look up the colour from [a
(index,index, index)] vector in a Voronoi texture. The Index could equally be used to offset U and V in an Image, or in any other texture lookup.
If you want the input geometry's UV to survive on its GN-Generated instances, you can capture it:
... and then call it up explicitly as a 'Geometry' attribute, in a shader:
Here, the instance index is used, crudely, to offset the original geometry's UV by a little in X, per instance. The offset could be organized, for example, to pick up a different value for every note in a stack, from an appropriately tiled Image texture, or a mapping of the index could be used as a factor to mix between textures.