This isn't pretty but will do just fine until we can get a better abstraction layer on top of (or better yet, in place of) the current render texture stuff.