Shader Graph Issue: Sprite not Rendering in Scene or Game View (URP)
I’m working on a 2D project in Unity using URP and Shader Graph. I created a shader that makes a palm tree sprite move by manipulating the vertex position. The logic for the movement is entirely in the vertex position, and the Sample Texture 2D is connected to the Base Color in the fragment shader.
In the Shader Graph preview, everything looks fine, and the movement works as expected. However, when I apply the material to the sprite in the Scene or Game view, the sprite doesn’t render, and I get the following error:
“Material does not have a _MainTex or _BaseMap texture property. Having one of them is required.”
I’ve already fixed the issue with the _BaseMap property since I’m using URP, but the sprite still doesn’t appear in either the Scene or Game view. If I switch to a default shader (like Sprites/Default), the sprite renders perfectly.
I’ve checked the following:
- The texture is correctly assigned in the BaseMap property.
- The material is using the correct shader and the Render Queue is set to 3000 (Transparent).
- The issue might be related to how the vertex position is being manipulated, but I’m not sure why the sprite is not rendering properly.
Any help or suggestions would be appreciated!
