   question about shaders
  I have a few doubts about shader technology internals. As fas as I know we have GLSL, Cg and HLSL. Also Pixel shader 1.0, 2.0, etc. When a program executes a shader, it passes the high level program to the card or the driver compiles that high level program to some asm like code? What's the difference between the pixel shader (PS 2.0) version and high level language version (lets say GLSL 1.3)?   
  Usually what happens is that the shader is compiled down to assembly on the CPU (such as ps_2_0), and that assembly is passed onto the GPU.  This assembly is standardized across graphics cards so you only have to write it once (but of course nowadays you're actually writing the higher-level HLSL/GLSL/Cg/etc., which is also standard across graphics cards).  The GPU then takes that assembly and converts it into its own special microcode which is specific to the hardware and executes that directly.The pixel shader version basically determines what kind of functionality you have available to you, and what assembly your code gets compiled down to.  You can write all sorts of high-level code, but if you compile against a version that doesn't support a feature you're trying to use (i.e. dependent texture reads, loops, dynamic branching), you'll get a compile error.Hopefully that was along the lines of what you were looking for :)   ;  HLSL code is compiled to assembly code by DirectX Runtime. GLSL on the other hand, is compiled by the driver. As for the second part of your question, I forward you to OpenGL registry's entry on ARB_fragment_shader.;  So, why not to pass the code already compiled and spare some processing time?;  Nobody said the shader is compiled every single time it's used or passed onto the GPU. As a matter of fact, it's only compiled once and reused from there on, since there's no point in recompiling a code that's not changed. I was talking about WHAT is in charge of compiling the shaders under different APIs, not how often they're compiled. In Direct3D, you even have the option of pre-compiling all shaders offline and loading the pre-compiled assembly code during runtime.   