A downloadable asset pack

Buy Now$24.99 USD or more

JPEG Compression Plugin for Unreal Engine

This plugin implements a real-time simulation of the JPEG compression algorithm using:

  • Discrete Cosine Transform (DCT)
  • Quantization using the standard JPEG luminance matrix
  • Inverse DCT for image reconstruction
  • YCbCr color-space conversion
  • Optional Bilateral Denoising for a more "mushed"/video-compression look

I plan on adding much more customization and block sizes in the future; this is a very new project. Since this seems to be the only actual simulation that uses Discrete Cosine Transforms, I think it's a fair starting price; however, I may adjust this in the future.

Compiled on UE 5.5.4. If you have any issues, please reach out.

Features

  • Real-time DCT/IDCT shader on 8x8 or 16x16 blocks
  • Standard JPEG quantization with adjustable quality scalar
  • YCbCr conversion pipeline
  • Optional bilateral denoiser (`SigmaR`, `SigmaS`, window/kernel size)
  • Debug overlay to visualize block boundaries

Installation

1. Copy Plugin

  • In your project root, create (if missing) a `Plugins/` folder.
  • Copy the entire `JPEGCompressionPlugin/` folder into `YourProject/Plugins/`.

Generate & Compile

  1. Windows: Right-click `YourProject.uproject` > Generate Visual Studio project files
  2. Open the solution and build the plugin or simply launch the Editor to compile.
  3. Enable in Editor
  4. Edit > Plugins > Search "JPEG Compression" > Check Enabled > Restart Now

Usage

  1. Activate Shader
  2. Open the console (`~`) and enter:
  • r.JPEGCompression 1 // Enable
  • r.JPEGCompression 0 // Disable

Adjust Quality, Block Size & Denoising

CVars:
  • r.JPEGCompression.Quality [0 - 1000] Quality Scalar for the compression table (all values).
  • r.JPEGCompression.BlockSize [8,16] Currently the shader only supports 8x8 (Classic JPEG) or 16x16 but I plan to add more block sizes in the near future if this does well. r.JPEGCompression.Debug [0,1] Enable/Disable the grid/blocksize overlay.
  • r.JPEGCompression.Denoiser [0,1] Enable/Disable the bilateral denoiser.
  • r.JPEGCompression.DenoiserSigmaR Colour sigma for the JPEG bilateral denoiser (higher = more color mixing, default 0.2) * Faster than SigmaS
  • r.JPEGCompression.DenoiserSigmaS Spatial sigma for the JPEG bilateral denoiser (higher = more blur, default 1.5) * Less Performant than SigmaR
  • r.JPEGCompression.DenoiserWindowSize Window size for the bilateral denoiser (odd values: 3, 5, 7, 9)

Troubleshooting

  • Unsupported BlockSize: Only 8x8 and 16x16 are currently implemented.
  • Compilation Errors: Ensure you’re targeting UE 5.5+, earlier versions may not work correctly.
  • No Shader Effect:

    1. Confirm plugin is Enabled under Edit > Plugins.
    2. Verify console echoes your CVar changes.

Roadmap

  • Support additional block sizes (e.g., 4x4, 32x32)
  • Custom quantization tables
  • UI

Purchase

Buy Now$24.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $24.99 USD. You will get access to the following files:

JPEGCompressionShader-main.zip 29 MB