# Disable tonemapping for SceneCapture2D

**URL:** <https://forums.unrealengine.com/t/disable-tonemapping-for-scenecapture2d/326871>\
**Category:** Asset Creation\
**Tags:** unreal-engine, Tonemapping, question\
**Created:** [July 28, 2015, 6:36pm UTC](https://forums.unrealengine.com/t/disable-tonemapping-for-scenecapture2d/326871 "2015-07-28T18:36:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_c0e54ce41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c0e54ce41](https://forums.unrealengine.com/u/anonymous_user_c0e54ce41)\
**Post date:** [July 28, 2015, 6:36pm UTC](https://forums.unrealengine.com/t/disable-tonemapping-for-scenecapture2d/326871/1 "2015-07-28T18:36:22Z")

</div>

When rendering SceneDepth to texture using SceneCapture2D and a post-process material, I’m getting tonemapped depth values.

Prior to 4.8, I was able to correct for these by raising the values to the 2.2 power. With 4.8, I can’t seem to correct for the tonemapping going on.

As a test, I have my material producing a constant value of (2, 20, 200) instead of the depth, but the output is (21, 79, 225). If I apply the fix that worked prior to 4.8, I get values of (0, 12, 202). It seems that something has changed in the blacks.

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c0e54ce41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c0e54ce41](https://forums.unrealengine.com/u/anonymous_user_c0e54ce41)\
**Post date:** [July 28, 2015, 11:39pm UTC](https://forums.unrealengine.com/t/disable-tonemapping-for-scenecapture2d/326871/2 "2015-07-28T23:39:28Z")

</div>

For those of you struggling like me, here is a solution I stumbled upon.

When pulling the data from the render target, set the following flag:

```
FReadSurfaceDataFlags Flags;

Flags.SetLinearToGamma(false);
RHICmdList.ReadSurfaceData(
    SrcRenderTarget->GetRenderTargetTexture(),
    Rect,
    OutData,
    Flags
 );

```
