I've gota Spatial shader attached to a terrain object.
I don't understand how this code works:
ALBEDO = vec3(length(VERTEX)/float(100), 1.0, 1.0);
It appears to change the color of the parts of my terrain based on my camera's position in space.
The code does what I want, but it doesn't make sense to me. Isn't ALBEDO the color of the entire terrain object?
Shouldn't the above code change the color of all terrain based on where I move my camera?
I'm working towards lowering the alpha of all parts of terrain that are above the player. But I can't do that if I dont understand how ALBEDO can selectively alter only parts of the landscape...