How to set the transparency of some parts of a mesh?

Hello,
I am developing a gas system for a 2D game. Here I generated some mesh chunks and applied a shader to it. You guys can check it in the screenshot. The problem is that I can’t find a way to set the transparency of some parts of the mesh cell based on the data during runtime. My plan is that each cell has its gas pressure value and that cell will be rendered constantly according to that value to represent the density of the gas in it.

Can anyone give me some inspirations or solutions for that?
Thanks a lot!

Oh, I found the solution by myself… Just set up certain vertex color manually in the script, and use the vertex color node in the shader graph, split RGBA into RGB and A, link RGB to color, link A(or do some other multiply) to Alpha. DONE!:slight_smile: