Updated Render to Texture Code