Diode destroys square wave?
The simulation looks basically correct. The gate of the MOSFET acts a small capacitor, so each channel's circuit looks like this:







simulate this circuit &ndash; Schematic created using CircuitLab

When the PWM output is high, it charges the gate through the diode. When it is low, the diode is reverse-biased and prevents the PWM output from discharging the gate. The gate does slowly discharge through the 1 MΩ resistor, but this discharge has only just started when the PWM goes high again.