Made deferred rendering example more modularized

to stay consistent with forward rendering example