This topic is for getting started writing and understanding shaders. General beginner's questions about mental ray should go in Open Discussion.

Here's some helpful things to include in your posts to help people help you:

What platform are you on, or asking questions about?

What compiler, or development environment are you using?

Are you using standalone, or making a shader for a specific application?

What is your language experience? C? C++? Scripting languages?

mi scene file editing experience?

Shader networking experience?