Experimental realization of a local-to-global noise transition in a two-qubit optical simulator