Got the G buffer stage of the deferred shader more or less working.