How to fix post process material (after tonemapping) gamma issue with renders?

If you have a post process material, set to After Tonemapper (and also replacing tonemapper), the gamma of the result for just that post process material is wrong. For examp if you create a post process material and just add a constant of 0.2 the viewport will show the correct grey, but when you render (either with MRQ or legacy) it’ll come out much brighter. If you add a power node of 2.2 after the constant then of course the viewport looks dark but the render will be the right value.

Hey Mike. I’m not sure I am following. The viewport is sRGB. Is your render linear? Which value for you is incorrect? The viewport or the render?

Hi Shaun, it’s not so much about the viewport being linear or anything, just that post process materials in the post process stack have a different gamma response in the viewport than they do in renders. This only applies to post process materials that happen after the tonemapper. So to replicate, if you make a post process material, just set a constant of 0.2 and plug it into the emissive slot of the material, then the viewport will display what is expected. But if you render it then you’ll see the brightness is very different. This isn’t a great use case but it’s a quick way of seeing the problem. I discovered it by making some post effects like grain and bloom, and they came out very different compared to the viewport.