Runtime API
Project Settings are enough for a fixed global look. Runtime APIs are only needed when gameplay changes the effect.
Blueprint world subsystems
Use Get World Subsystem and select Cel Shading Subsystem or Dithering Shading Subsystem. Both expose:
Set EnabledIs EnabledSet SettingsGet SettingsReset to Project Defaults
Read the settings struct, modify it with Set Members in Cel Shading Settings or Set Members in Dithering Shading Settings, and pass the result to Set Settings.
The optional Cel Shading Component and Dithering Shading Component apply an actor-owned world override while active and restore the captured world settings when deactivated. They do not render per actor and are not required for setup.
C++ dependency
PublicDependencyModuleNames.AddRange(new[]
{
"Core",
"CoreUObject",
"Engine",
"YShade"
});
C++ example
#include "CelShadingSubsystem.h"
#include "DitheringShadingSubsystem.h"
if (UCelShadingSubsystem* Cel = GetWorld()->GetSubsystem<UCelShadingSubsystem>())
{
FCelShadingSettings Settings = Cel->GetSettings();
Settings.bEnabled = true;
Settings.Bands = 3;
Settings.Pattern = ECelPattern::RoundDots;
Settings.bEnableOutline = true;
Cel->SetSettings(Settings);
}
if (UDitheringShadingSubsystem* Dither = GetWorld()->GetSubsystem<UDitheringShadingSubsystem>())
{
FDitheringShadingSettings Settings = Dither->GetSettings();
Settings.bEnabled = true;
Settings.ColorSteps = 6;
Settings.Weight = 0.65f;
Dither->SetSettings(Settings);
}
Call subsystem APIs on the game thread. Each view extension copies its effective settings into render-thread state during view-family setup.
Console overrides
Console values use -1 to resume settings-driven control. Common overrides include:
| Cel / Halftone | Screen Dithering |
|---|---|
r.YShade.Cel.Enabled | r.YShade.Dither.Enabled |
r.YShade.Cel.Bands | r.YShade.Dither.Pattern |
r.YShade.Cel.Midpoint | r.YShade.Dither.ColorSteps |
r.YShade.Cel.Pattern | r.YShade.Dither.PixelScale |
r.YShade.Cel.PatternStrength | r.YShade.Dither.Strength |
r.YShade.Cel.PatternSpace | r.YShade.Dither.Weight |
r.YShade.Cel.Outline | r.YShade.Dither.Monochrome |
r.YShade.Cel.Debug | r.YShade.Dither.Debug |
Cel debug values are 0 final image, 1 band index, 2 outline mask, 3 illumination, 4 albedo, 5 normals, 6 pattern threshold, 7 pattern coordinates, 8 motion offset, and 9 stencil. Dither debug values are 0 final image, 1 pattern, 2 quantization error, 3 quantized without dither, and 4 downsampled input.
