SceneTexture: SceneColor not working anymore

I just updated my projects from 4.8 to 4.9 and all my post processing shaders are not working anymore!

This is the error I get: Error [SM5] (Node SceneTexture) SceneColor lookups are only available when MaterialDomain = Surface. PostProcessMaterials should use the SceneTexture PostProcessInput0.

First of all that makes no sense to me, SceneTexture is meant to be for post processing materials and not surface materials. Secondly PostProcessInput0 is something different.

SceneColor is as the name implies just the scene color without processing that alter color like tonemapping, it also doesn’t include effects like bloom and depth of field, furthermore it doesn’t have gamma correction applied. So it is a bare bone rendering which can be used in a post processing to do all kinds of calculations without any of the post settings messing it up. Post Process Input0 on the other hand is the final rendering with everything in the post processing chain applied!

It is a vital part of all my post processing shaders, please make the fix a priority for a future UE4 version so I can update my projects.

This would also explain the general bad performance of 4.9 regarding my project (I’ve to do heavy postprocessing for outlines/highlighting).

Hello Davision,

So from what you describe you are saying that your SceneColor isn’t working anymore. You are correct in your reasoning where SceneColor without all of the other effects that post processing offers, or are enabled, and should be unique to color only.
The input for post process calculates all of the post process compiled and draw in your project.

If you would link me a screenshot of your post processing and what you have enabled as well as a screenshot of it not working in your viewport.

I do have a couple of questions for you.

1.) You said this was a converted project. Does this still happen in a new blank project?
2.) Can you see if a blank project works in 4.8 but when you copy it doesn’t in 4.9?

After I have this information I will continue to investigate what is causing this.

Thank you,

1: Yes 2: Yes
It is really simple, make a post processing material and in it make scene texture node with the setting: SceneColor

This is a blank 4.91 project with the setup I described:

As for performance in 4.91 I can’t tell anything because none of my post processing materials work in that version.

Hey Davision,

That is intended behavior. Note the Error you are receiving for using Scene color. If you change to PostProcessInput0 this fixes that error.

Now, it looks like you are trying to add a scene color to the post processing to add a desired color to your project. We are tending to move more toward volume and procedural based workflows with 4.9. I am not quite sure why this was working in 4.8, unless, all along this was broken or not working as intended in 4.8.

If you are intending to just add some color/tone to your scene you can add a post processing volume. From there you can either set it to bound or unbound. Volume will either effect a specified area through bound and an infinite area with unbound. Under the settings in the volumes detail panel there is a section for scene color. Have a look at that and let me know if this is what you had in mind for your project.


As I already described in my initial post SceneColor is something completely different from PostProcessInput0!

I do a lot of different calculations with Scene Color: Hue, Saturation, brightness, lighting. I use PostProcessInput0 to access the rendering with depth of field blur applied. As mentioned before PostProcessInput0 has also all the other effects applied while Scene Color not.

Why should something that worked before and that gives significantly more options in working with post process materials have been unintended all this time? I also worked with it various version before 4.8 and it always worked fine.

To give you a better idea what is possible with it here are some gifs and images from my project:



It allows me to map hue, saturation, brightness and lighting to ramps that give colors a painterly look (Not possible with PostProsseInput0). Furthermore I can use PostProcessInput0 separately for blurring which is obvious in the first gif but also is used to fake color bleeding/mixing which adds a lot to the painting look. I also used that color bleeding to get mixed colors for colored outlines.

Please, just make SceneColor working again, I don’t see any reason why it should be stripped from the engine.

Hello Davision,

I thoroughly read your first post and made an assessment based off of my knowledge of proper workflow for Post Process materials. Just because something worked in a previous version doesn’t necessarily mean that a later version is where the actual bug is.

I realize that initial post SceneColor is something completely different from PostProcessInput0. As you described, Scene Color is the initial input that works upstream from the differed PostProcessing material you have created. I tried to assess what you were attempting to do and provide a suitable workflow that would produce that result.

However, now that I have context through your provided images and gifs I can begin to work this problem from a different angle. Also, if something worked before and provided different options, this doesn’t mean that this feature will always behave the same way in a different version of the engine. For instance we changed our algorithms and computations of the dithering with Temporal and FXAA. This is causing issues across many users projects that are now copying their projects from 4.8 to 4.9. I realize this isn’t directly linked to your issue but I’m trying to give you context for how things can change from version to version.

Now, I have done a fair bit of research and discovered multiple users experiencing issues with adding scene color and color correction to their Post Process volumes and these are not overriding the camera. Again, this may not be directly linked but it could correspond to the Scene Texture : Scene Color you are using in your material. If the scene color is broken in volume it could very well be a bug that also extends to the Scene Color node.

What I am going to do is enter a bug for this. I may hear back from our developers that this is intended behavior. In which case I will ask for the workflow from them and relate this information to you.

Ok, well, I’m just assuming you try to avoid breaking projects with updates and avoid stripping away any functionality. Or if have to provide different ways to for stripped away functionality. Also, that error message that pretty much makes no sense just adds to the frustration.

Anyway, I’m glad it gets looked into and I hope for the best. In my case though I would require something that allows me to do it inside the material otherwise I’m pretty sure I have to stick with 4.8 for my games.

Hey Davision,

I understand your frustration. I had a project where I had worked nearly 100 hours on, just myself, and when I tried to copy to 4.9 I had to spend hours going back through the project to figure out what still worked.

What we have been asking of users is if they are in an advanced stage of development, please stay within the version that the project was started in.

I am going to enter a bug and hopefully this will be fixed in a timely manner.

The bug number is UE-21737

Hey Division,

The bug I entered has been flagged as a major issue. Hopefully this will be resolved soon.

No offense, but these policy is kind of problematic in many cases. “You found a bug which leads to big problems in your project? Great, we’ll fix it in the next version. Oh, and you shouldn’t update.”

I had to read this statement quite often with different words here. If you don’t have a bunch of C++ engineers which cherry-pick only the critical commits (and there dependencies) back to a custom build of the engine based on an old version for you, you just have to update, otherwise you’ll just get no fixes for bugs (and we all know, there are still many of them).

I also assumed that there would be some kind of automated migration for breaking changes in the engines, at least from one major version to the next one.

Currently it feels like russian roulette. Some things break right away, some things just break silently (Blueprint-Nodes are disappearing just because they are renamed etc.).

Great, thanks! Not updating appears unrealistic to me. You can always bump into bugs down the line that are fixed in a newer version. Especially when you consider releasing it to different platforms you might be stuck with a engine version that comes with lots of problems on those platforms.

Sorry to cause trouble for your existing content. Looking at the pretty painterly rendering videos I understand you want to have it working as before but it also seems to be a special case. As the source code is available I suggest you comment the error in code and quite likely you content will work again (if not the solution below would be needed). We are doing engine optimizations and this change prevents some optimizations which haven’t been finished yet.
Let me explain a bit: SceneTexture:SceneColor gives access to a intermediate rendertarget which is needed only during lighting. For postprocessing we want to free it and reuse the memory for the postprocessing. This is especially important for hardware like the XboxOne. I suspect many uses wanted to do color manipulations and did them by reading SceneColor - it seems the right thing to do. This goes wrong with TemporalAA as SceneColor is jittered and it looks bad. It also looks wrong with multiple PostProcessMaterials in a chain where you don’t get the data from the one before. PostProcessInput0 has that data and that is why the error message mentions this.
The PostProcessing UI doesn’t make that clear and this is why we want to prevent that access. The correct fix would be to do reference counting on the SceneColor to keep it alive until no longer needed.

We work on larger performance improvements - we try to make your use case working again but I cannot promise when that will be.

With changing the source code I would not know where to start, I’m not really a programmer, I just do everything with Blueprint. I’m not sure how it works but wouldn’t it be best to use the mentioned memory only when certain SceneTexture elements are used inside a post processing material?
Then you don’t have to limit post processing materials and instead can extent,
so that would then also allow to make more SceneTexture types without having to use more memory when those options are not used in a particular material. I think there is much more potential for post processing materials. It could have all those channels you have in non realtime 3d rendering. Lighting, Masks (material IDs, Object IDs, defined), Vertex Colors, Shadows, Hue etc.
I currently use hacky ways inside the material to derive lighting, hue, saturation and brightness with Scene Color which are probably all much slower when done with material nodes and lightning only works greyscale. For Masks I use Decal Mask and Custom Depth differently which only gives me 2 limited masks.
I honestly don’t care about TemporalAA nor being able to have multiple post process material rendered on top.

Concerning masks I also wrote more on it here some time ago: Masks - Feedback for Unreal Engine team - Unreal Engine Forums

In any case, being able to use Scene Color again would be already great.

Please refer to Martin’s answer lower in this thread.