Actually restore the viewport after popping the state.
Remove duplicate Material / MaerialParameters.
Fix planetrings shaders for modern GLSL.
Update the shader code dumping.