- Home /
Lerping colour in a mesh with 4 vertices
I have just finished this tutorial for making water in unity in 2d https://gamedevelopment.tutsplus.com/tutorials/creating-dynamic-2d-water-effects-in-unity--gamedev-14143
The water is made up of many meshes with 4 vertices each which are horizontally side by side. I want to lerp the colour from light blue at the top of each mesh to dark blue at the bottom so that the water gradually gets darker going down the mesh. How can I do this. Should i use a shader script or something else? I know the rgb values that I want for the two colours so I basically just need a way to change the colour linearly between the two colours from the top of the mesh to the bottom. I am using the same material for all the meshes.
Your answer
Follow this Question
Related Questions
Calculate distance between two surfaces? 3 Answers
How can I properly control a complex model in Unity3D 1 Answer
Bad Mesh quality after import 2 Answers
Swap Mesh upon Collision? 2 Answers