🤔

Shader Graph: Sprite Renderer setup#

If Shader Graphs are improperly configured, sprites won't update when the Sprite Renderer is changed, and the sprites may become clipped by the current settings.

Resolution#

  1. Sprite values should be set via the Sprite Renderer.
  2. Use a Sprite Shader Graph (Lit or Unlit) if it is available to you.
  3. Name the exposed color texture MainTex (the reference should be _MainTex).
    warning

    This includes capitalisation and spaces

    1. Select + on the Blackboard and then select Texture 2D.
    2. Drag the property into the editor window and attach its output to a Sample Texture 2D node.
    3. Attach the RGBA output to the Base Color input of the Fragment block.
    4. Attach the A output to the Alpha input of the Fragment block.