How would one remove rectangles from this texture via shader? Is it possible?

Yes, I could manually remove them and then use that texture (for star sky shader I’m doing), but Id much rather have a parameter that simply diminishes the number of stars (rectangles).
6740440--776767--pattern55.png

The easiest approach I can think of would be to modify the texture to give each star a random brightness between something like 8 and 255. Then in Unity make sure the texture is set to use point filtering, and check in the shader if the value is greater than some slider with a step function.

fixed starTex = tex2D(_StarTex, i.uv).r;
fixed starMask = step(starTex, 1.0 - _StarProportion * ((255.0 - 7.0) / 255.0));