Reputation: 11
So Im trying to create an outline using shaders and materials, however, i cannot seem to get the image of the material reflecting the image on the sprite render, please help.
Like it keeps saying i dont have _MainTex but its quite clear i do, and ive tried everything, even setting it programmatically.
edit - i was using shader graph, im new to shader graph, and the tourtial i follow said it was name must match.
I found out after much heart break it was the reference.
Upvotes: 0
Views: 9452
Reputation: 90600
What you show is only the display name for the Inspector .. the property name might differ from that! (See Writing Shaders) Important is the first name here:
Properties {
// | this matters
// | | this is only for the Inspector!
// V V
_MainTex ("My Texture", 2D) = "white" { }
}
Upvotes: 2