Implemented slope based mixing in fragment shader.