We demonstrate the transition from local to global noise in a two-qubit all-optical quantum simulator subject to classical random fluctuations. Qubits are encoded in the polarization degree of freedom of two entangled photons generated by parametric down-conversion (PDC) while the environment is implemented using their spatial degrees of freedom. The ability to manipulate with high accuracy the number of correlated pixels of a spatial-light-modulator and the spectral PDC width, allows us to control the transition from a scenario where the qubits are embedded in local environments to the situation where they are subject to the same global noise. We witness the transition by monitoring the decoherence of the two-qubit state.