shader refactor for HLSL
* extract shared code from HLSL and GLSL generators into SlGeneratorInstance
* fix several mistakes in GLSL