The idea is to draw a quad on the screen.
Then in fragment shader to simulate viewing an infinite ground, by this way to generate grid texture and depth per pixel.
https://asliceofrendering.com/scene%20helper/2020/01/05/InfiniteGrid/
]