I’m having a small problem with my toon shader on UE 5.5. At first, I had a lot of glitches appearing around my character when he was moving. I changed Blendable Location from Scene Color Before DOF to Scene Color Before Bloom and changed the antialiasing from Temporal Super Resolution (TSR) to Fast Approximate Anti-Aliasing (FXAA). I thought I’d completely fixed the problem, but I later realized that glitches reappeared when my character is moving when it is close to a light source.
They’re much less prominent than before my changes, but you can still see them. I tried setting the antialiasing to none, but it didn’t change anything. Has anyone else encountered this type of problem with the toon shader ?
Hm, it’s kinda hard to tell what could be going on with the information provided, as there’s quite a few different ways of making a toon shader. If that bright white thing is your moving character, then my guess is that you’re seeing emissive artefacting from having emissive values that are too bright (especially if you’re using Lumen for your lighting method).
If this isn’t the case, could you send over some for information? I’d like to try and replicate this issue on my side. Could you send your toon shader logic and a video of the effect happening?
Here’s a video of the glitch where you can see the glitches around the character. This time, I used the mannequin to see if it made any difference. I added a ray light source just above him.
So, I think I had some luck replicating this issue, though it wasn’t as prominent on my end as on yours. The slight glow around the character indicates to me that your light values are too high. Indeed, cranking up the strength of my light is what allowed me to replicate this.
Try turning off your postprocess volume and changing the lighting to non Game Settings. This will remove the auto-exposure. If your scene is suddenly blown out, then your light strength is indeed the issue.
This reduced the problem when you’re a short distance from the light source, but when you’re very close to it, you can still see glitches around the character.
Regarding my exposure setting in post-processing, I’m using the manual setting with exposure compensation at 11.
Could this be related to the problem because this value is too high? The problem is that if I lower it significantly, my scene will be very poorly lit.
Alright, yeah it’s definitely not your lighting that is the issue, that’s a very dim light and you’re still seeing some issues (you can go ahead and reset that). After trying a bunch of different configurations, I can’t replicate your issue, but I do have a few other suggestions that you can try.
First of all, I would try creating a new test level with a completely new postprocess volume with this material. If you’re still seeing issues in this level, this will confirm that the issue is not due to some setting changes.
Next, I would try changing your lighting method. If you’re using Lumen, it evaluates lighting every frame, which can mess with toon shaders (granted, not usually in the way you’re seeing here). Still, I would try the other Global Illumination methods to see if that might be the cause.
Lastly, if none of these work, I would change how you evaluate your light values. Your current method is causing a lot of graininess and while you do later mask this out, I’m wondering if a glitch here might be the cause.
I followed the different things you said one by one but it didn’t fix the problem for me. I’m not sure why it persists, especially if you say that it’s working pretty well for you.
I’m not an expert in toon shaders, and clearly Sarah would be more helpful than I am in this case. However, just for debugging purposes, could you try the following:
Change the Bloom setting to “Convolution” in your Post Process volume, and then disable it to see if it makes any difference.
Try changing your Anti-Aliasing Method.
Test all the available options (e.g., FXAA, MSAA, Temporal AA, etc.) and observe if there’s any noticeable change.
You can find this setting under:
Project Settings > Rendering > Default Settings > Anti-Aliasing Method.*
I tried changing the convolution setting as you said but unfortunately it didn’t change anything.
I had already tried changing the aliasing settings, the FXAA coupled with the Scene Color Before Bloom in the Blendable location of my material gives me the best possible result for now.
It has reduced the thing considerably since the beginning thanks to Sarah’s advice but there is still a remainder when you move while being close to a light source.
Yeah, that’s so strange to me. It sounds like your toon shader is having a hard time interacting with the bloom, though I would think you would have noticed a difference when you changed the bendable location. Try disabling Bloom (and just to be safe, also Motion Blur and any Depth of Field settings) in your postprocess settings and seeing if that helps.
Hell, if that doesn’t work, let’s try disabling the tonemapper. You can follow this quick tutorial to do so, just write down any settings you’re overwriting so you can reenable it later.
If none of this is working, to be honest I’m about out of ideas. If you haven’t already, I would suggest creating a build of your game to confirm this issue isn’t just in-editor. If you’re still seeing it, at that point I would recommend trying a different toon shader. Here’s an alternative that might work for you (the second one): (Tutorial) Ultra-Simple Cel-Shading Implementation - #2 by juanlink661
I had already disabled Bloom and other settings in the post-processing volume. I added the lines you indicated to the .ini file, but it didn’t change anything.