Shader fixed world positioning

I have created the following shader. I expected my sprite to be gradiently colored, depending of each point coordinate.


Instead, it is colored as 4 rectangulars, with center in (0,0)
5925446--633371--photo_2020-06-01_14-17-49.jpg
What am I doing or undestanding wrong?

Problem solved. I had very lagre scale, and color should be between 0 and 1. Therefore all what above 1 will have same color.

1 Like

Just a tip; I always use a multiplier when I use coordinates or such bit hard to interpret values (like view space or world space). Then it’s easier to debug things when you can just adjust that multiplier and see if things look correct when you scale that multiplier up and down. When things start working, you can remove those test things… But they make life much easier.