I don’t know much/anything about shaders, and I’m assuming that is what I need. I have a voxel world (don’t worry not another minecraft clone) and all the “grass” blocks are using one material and I wanted to make it so grass that was around 0 would be the normal color and grass that was higher up change to a brighter color, in such a way that it didn’t affect the other grass blocks that are not as high. Is this possible?
You generally have two options. If each voxel is going to be a separate object, you can give them a script that sets the shader colour based on its height. Alternatively, within a shader you can use Object2World to get the world position of each vertex. Probably want to watch a few tutorials on shaders first to get an understanding how they work.
Edit: actually if you’re using one material, then you’ll need to use the shader option. To get the other option to work you’ll need to use separate materials and assign them with the script.