[Bug]:Different result with constant vs parameter (in postprocess mat)

I was recreating simple posterization postprocessing shader ([Shader Library] Posterization Post Processing Effect (GLSL) | Geeks3D) and bumped into this strange bug (or possibly I’m doing something wrong) - when I use a simple constant, all looks ok, but when change the constant to parameter, result changes, the whole scene becomes much brighter.

Here is the simple shader network:

This setup renders the final image too bright. But as soon as I use the constant (unused constant with 8 in the picture), picture is darker.

Hi Tomas,

Thank you again for your patience, I was able to reproduce this issue in our main branch and have created a report for the bug. It has been assigned to a developer, who will resolve the error. Please let us know if you discover a work around in the meantime, as it may help other users until a resolution can be integrated.

Thanks!

Alexander

Hi and thanks. For now, using constant is ok for me. Once it get’s fixed and finds it’s way into a beta I will modify my material. If I would find some other workaround I will post it.

Dear Tomas,

Could you upload your material to drop box, using the migrate method (right click), so that any linked references are sent to?

You can migrate to a folder on your desktop and then zip it and upload (just click past the this is not a content folder message) :slight_smile:

You are adding this as a Blendable on your main post process volume?

Rama

Here is the attached shader asset. I guess simple copy/paste (without migrate) should work, right? No textures or any other assets used in the shader.

Yes, adding as blendable in the default map (for testing purposes).
link text

#My Repro (or not repro)

  • I downloaded your files
  • I added the original as a blendable, nice effect!
  • I then right clicked and made a material instance constant
  • I switched between the two several times

I did not detect any difference at all between the two

I proceeded to play with the material instance constant settings, hopefully for your entertainment:

My Recommended Solution

This might sound kind of bonkers but its the only thing I can think of:

Go to your project directory and delete the Saved folder.

You can delete everything except autosaves if you want to keep that folder :slight_smile:

(you might want to make a backup of all your uassets to external drive before doing this)

Please note this will delete all your editor settings and how you custom arranged them and what panels you like to have open, and maybe also any custom key bindings you set in editor preferences.

Buut, it’s the only solution I can think of :slight_smile:

Why?

Cause it has worked several times in the past for people having weird sudden brightness issues. :slight_smile:

Rama

Ah, so there were brightness issues like this before?
Could you try to repro it with the material and not the instance? Just assign the PP material to blendables, then rewire the constant as shown with the green arrow, compile and see if there is no change in brightness.

“then rewire the constant as shown with the green arrow, compile and see if there is no change in brightness.”

ooooh

missed that part

one sec

#Crash

I cant edit the material that I downloaded, it crashes, oddly as you can see from my pic I could use it just fine though :slight_smile:

You will have to upload a version that is exactly as how you’d like us to test it :slight_smile:

This crash would deserve its own thread if there wasnt such an overflow at the moment :slight_smile:

Not sure what you want me to upload. That’s the material that changes the resulting brightness (when used as blendable PP) depending on whether the parameter is connected (on my picture the connection that has “brighter” text over it) or if constant is connected (what the green arrow hints on).

oooooh!

I get your issue better now

well

I cant test it because of the crash unfortunately.

I would suggest you work around this for now until Epic can offer you some clarification on this, it shouldnt be hard to work around given that you can just add in a multiply and a Brightness parameter at the end.

It’s really not a big deal to work around, I was merely submitting a potential bug.

well the crash is definitely an issue

#More info

When I tried to make my own post process, and drag off the Scene Texture node, it crashes every time.

I did use the Beta6 hotfix so maybe will just wait till beta7 before pursuing this further

I think I used the hotfix too, but I’m not getting the crashes you mention.

#Even More Info

I get the same crash I got with Tomas’s .uasset when I try to open the Example content post processes.

It all seems related to the Scene Texture node

Assertion failed: Enum [File:D:\BuildFarm\buildmachine_++depot+UE4-Rocket+Beta6\Engine\Source\Runtime\Engine\Private\Materials\MaterialExpressions.cpp] [Line: 4170]

Stack:
Address = 0xe3d93156 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xe3c8345a (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xe24e432d (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xdef7e9b2 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-UnrealEd.dll]
Address = 0xde2aac58 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xde25d5ed (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xde23729e (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xde31ec47 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xde242871 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xde31d3ea (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xde318ea0 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-GraphEditor.dll]
Address = 0xe0208d12 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Slate.dll]

Hey Rama,

Thanks for this information. Could you make a separate post about the crash you are experiencing, if you have not already? That will make it easier for tracking these different issues.

Thank you for your patience Tomas, I am investigating this issue with the asset provided and will update you as things develope.

Cheers!