# How to limit the color palette while rendering?

**URL:** <https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059>\
**Category:** Rendering\
**Tags:** Post-Processing, Color-Grading, unreal-engine, UE5-0, Rendering, question\
**Created:** [June 2, 2022, 2:02am UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059 "2022-06-02T02:02:10Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![S.P.Gardebiter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S.P.Gardebiter](https://forums.unrealengine.com/u/S.P.Gardebiter)\
**Post date:** [June 2, 2022, 2:02am UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/1 "2022-06-02T02:02:10Z")

</div>

I’ve been looking for a way to limit the on screen colors to a certain color palette (like they had in old retro games).

Using the LUT alone does not work, since it does not effectively limited the number of colors on screen. So I’ve tried color quantization using a post processing material, the blueprint for it looks like this:

 ![ColorLimiter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/d/a3d02057744f530e5f78719132791f732bebd99e.png)

Sadly this causes rendering issues, namely, making parts of the screen flicker:  
 ![UE5Flickering](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/0/5d06f2c9347dea9eea48339836a55ce519dd7c76.gif)

Please note that I’m using another post processing material in the gif, that lowers the rendering resolution, however, it does not cause the flickering, it just makes it more visible. The flickering persists, regardless of any other settings or actors in the scene.

If anybody has an idea how to either fix this flickering issue or what other technique could be used to archive a limited color palette, help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [June 2, 2022, 4:01am UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/2 "2022-06-02T04:01:58Z")

</div>

Flickering may be due to temporal antialiasing. You might try disabling it and seeing if it goes away.

---

<div class="post-metadata">

**Author:** ![S.P.Gardebiter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S.P.Gardebiter](https://forums.unrealengine.com/u/S.P.Gardebiter)\
**Post date:** [June 2, 2022, 3:42pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/3 "2022-06-02T15:42:53Z")

</div>

Thanks for your advice.  
I’ve tried it out and while it does seem to affect the flickering a bit, it’s sadly not much more than a drop in the ocean. Any other idea what might be causing this?

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [June 2, 2022, 4:55pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/4 "2022-06-02T16:55:19Z")

</div>

Did you try FXAA?

My next guess would be that its caused by other features in the engine that rely on using temporal noise; I don’t know all of them but off the top of my head _I think_ these ones do:

- Lumen
- Volumetric Fog
- Volumetric Clouds
- Sky Atmosphere system

Plus any material where you are using randomness in the DitherTemporalAA node.

I think your best course of action would be to disable Lumen (if you’re using it) and then set up a simple scene with just a couple of lights and see if you experience the same flickering effect. If it works okay then at the very least that will narrow it down to specific engine features.

---

<div class="post-metadata">

**Author:** ![ezuvella](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ezuvella](https://forums.unrealengine.com/u/ezuvella)\
**Post date:** [June 2, 2022, 6:25pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/5 "2022-06-02T18:25:15Z")

</div>

I will definitely try FXXA.

---

<div class="post-metadata">

**Author:** ![S.P.Gardebiter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S.P.Gardebiter](https://forums.unrealengine.com/u/S.P.Gardebiter)\
**Post date:** [June 2, 2022, 7:07pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/6 "2022-06-02T19:07:18Z")

</div>

I did try out all anti-aliasing methods (including FXAA).

I disabled Lumen here:  
 ![Lumen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/b/e0b3dc7928ee90addca0c8f2e748e249144b2418.png)

No volumetric fog, no volumetric clouds, no sky atmosphere system:  
 ![Objects](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/9/fe9736cf267347565cc38d76ceacd2cc903bcc49.png)

Problem persists nontheless though:  
 ![UE5Flickering2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/7/95718ebfd9c617aac1b6b73093865ff9f1589025.gif)

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [June 2, 2022, 7:18pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/7 "2022-06-02T19:18:39Z")

</div>

can you post your other post process materials?

Edit: Actually, try using floor or ceil instead of round nodes in your color quantization material

---

<div class="post-metadata">

**Author:** ![S.P.Gardebiter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S.P.Gardebiter](https://forums.unrealengine.com/u/S.P.Gardebiter)\
**Post date:** [June 3, 2022, 1:15am UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/8 "2022-06-03T01:15:59Z")

</div>

The only other post process material is the one I’ve mentioned in the starting post. And that one is unrelated to the problem.

 ![ResolutionDownsampler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/2/e126d4036d059e60fb39641a35a689b9a0846775.png)

Doesn’t matter if I’m using round, floor or ceil, the problem is either the same or worse (worse if I use ceil at the top path).

---

<div class="post-metadata">

**Author:** ![AlexPeres70](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlexPeres70](https://forums.unrealengine.com/u/AlexPeres70)\
**Post date:** [August 7, 2022, 2:12pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/9 "2022-08-07T14:12:03Z")

</div>

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/9/0d95800652a9f593107f9bd5de9ea5fc4853b18c.jpeg "UE4 Tutorial: Low Resolution Post-Process (Classic Gameboy)") ](https://www.youtube.com/watch?v=5k3g4CNCSvg)

Maybe this is what you need.

---

<div class="post-metadata">

**Author:** ![MarcoMariaRossi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marcomariarossi/32/1069093_2.png) [@MarcoMariaRossi](https://forums.unrealengine.com/u/MarcoMariaRossi)\
**Post date:** [October 26, 2022, 2:28pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/10 "2022-10-26T14:28:56Z")

</div>

Ever found a solution?

---

<div class="post-metadata">

**Author:** ![max010113](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@max010113](https://forums.unrealengine.com/u/max010113)\
**Post date:** [December 25, 2022, 8:16pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/11 "2022-12-25T20:16:51Z")

</div>

what fixed the flickering for me:

1. Go to C:\Program Files\Epic Games\UE\_[your UE version]\Engine\Shaders\Private
2. Open PostProcessTonemap.usf in Notepad
3. Add the line `#undef USE_GRAIN_QUANTIZATION` to the top of the file  
Also going into the project settings and changing the Anti-aliasing method to MSAA removed some more flickering  
still a bit left but much better after this  
Source: [GitHub - DaveFace/UnrealRetroShaders: Retro PS1 Post Processing for Unreal Engine 4.](https://github.com/DaveFace/UnrealRetroShaders)

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [February 25, 2023, 5:19pm UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/12 "2023-02-25T17:19:43Z")

</div>

Using a post process effect is usually a good solution. Are you thinking something like this: [Elias Wick – Retro Pixel Style](https://eliaswick.com/products/retro-pixel-style) and [Elias Wick – Colorize](https://eliaswick.com/products/colorize)?

---

<div class="post-metadata">

**Author:** ![OllieIsAN1664](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OllieIsAN1664](https://forums.unrealengine.com/u/OllieIsAN1664)\
**Post date:** [January 18, 2025, 5:53am UTC](https://forums.unrealengine.com/t/how-to-limit-the-color-palette-while-rendering/572059/13 "2025-01-18T05:53:35Z")

</div>

You could use “execute console command” in the construction script of the player and use the command "R.ScreenPercentage " and then write how much screen percentage you want. Also note that you also have to turn off antialiasing for it to work
