State variables hooked up to GLSL uniforms, fragment shader modified