
Originally Posted by
-NiCo-
Here's what I would do:
- Create a black alpha texture with white lines along the x-direction at regular intervals in the y-direction.
- Align the alpha texture to the blue rectangle in your example images.
- Enable blending so that your filled mesh values get multiplied with the alpha texture values and you get lines as a result.
You can just draw one white line in the black alpha texture, set the texture coordinate wrapping mode to repeat and play with the texture coordinates to get a more sparse/dense displaying of these virtual lines without having to recompute the actual lines.
PS. You can also do this easily in fragment shaders without the need for an alpha texture.
N.