GL.Line help? Cannot see line drawn... draw grid using gl.line

I am running into trouble with drawing a simple line to test the gl.line technique. How is this method used?

I used code in the documentation to draw a simple line, but nothing shows up.
I am also confused as to what the material is used for that it asked for.
What are the requirements to set up this material?
Where do i have to use this material for my lines to show up?

Here is my code attached to an empty object:

void OnPostRender() {
if (!mat) {
Debug.LogError("Please Assign a material on the inspector");
return;
}
	GL.PushMatrix();
	mat.SetPass(0);
	GL.LoadPixelMatrix();
	GL.Color(Color.yellow);
	GL.Begin(GL.LINES);
	GL.Vertex3(0, 0, 3);
	GL.Vertex3(Screen.width, Screen.height, 3);
	GL.End();
	GL.PopMatrix();
}

Can i set a transparency of the lines? Why doesnt my line show up?

Do i have to call this method somewhere, i assumed it is called in the draw procedure as it draws these last…

Any ideas?

Instead of: GL.Vertex3(Screen.width, Screen.height, 3);

Try : GL.Vertex3(1/Screen.width, 1/Screen.height, 3);

GL.Lines is normalized (all values are from 0 to 1);

For the lazy approach: Draw grid lines in game view? - Unity Answers

My answer to that question gives you a ready to go script that you can attach to your camera and have a custom sized, 3D or 2D grid in the game world.

You found the answer?

Did you assign the “OnPostRender()” event to a camera? use Debug.log() to be sure that the event is being executed.

"OnPostRender is called after a camera finished rendering the scene.

This function is called only if the script is attached to the camera and is enabled. OnPostRender can be a co-routine, simply use the yield statement in the function."

More info: