Moved the shader logic inside game engine