De-macroize render_sample macros