change to internal implement for multi-pass rendering.