Skip to content

Releases: kathoc/brickboy-dmg-shader

v0.1.0 - DMG panel pipeline

Choose a tag to compare

@kathoc kathoc released this 03 Aug 04:10

A port of brickboy's DMG display pipeline to a RetroArch slang preset.

What it is

Six passes, ported from brickboy's src/display/.

Pass Ported from
xtalk-field FRAG_COLUMN_REDUCE
color-correct FRAG_COLOR_CORRECT (dmg-lut path)
grid FRAG_GRID
ghost FRAG_GHOST
defects FRAG_DEFECTS
finish FRAG_PASSTHROUGH, the present finish

The maths, the constants and the pass order are the originals. Defaults come from profiles/dmg.json.

  • passive-matrix crosstalk (RMS-weighted, directional)
  • LCD persistence as a per-pixel analog state, asymmetric between driving and relaxing
  • pixel drop shadow from the air gap, near umbra plus broad penumbra
  • reflector sheet grain and the printed mask border
  • dead electrode lines (columns and rows), vinegar syndrome, dust, ageing

Install

Drop the brickboy-dmg folder into RetroArch's shaders/, then Quick Menu → Shaders → Load Preset → brickboy-dmg/brickboy-dmg.slangp.

  • driver must be vulkan / glcore / d3d11 / d3d12. The legacy gl driver cannot load slang presets
  • set the core to a plain DMG palette (Gambatte: Colorization = disabled, Internal Palette = "GBC - Grayscale")

59 parameters. Damage defects are all off by default — a healthy panel.

Verification status

Every pass compiles and runs under RetroArch 1.21.0 (glcore). How it actually looks on a real display has not been checked.

The four adaptations

Only where it meets libretro.

  1. Shade recovery — the core hands over sRGB, so the shade is recovered from luminance
  2. Ghost dt — fixed at one GB frame, 16.742 ms, as brickboy's own offline render harness does
  3. Dead-line flicker time — derived from FrameCount
  4. Reflector grain — a preset cannot run CPU code, so the same bake is shipped as a PNG

Where the numbers come from

docs/display-pipeline and docs/dmg-panel-color are bundled in full, in Japanese (.ja.md, the original) and English (.en.md). The first is brickboy's own specification of the look, written so it can be re-implemented on any core in any language — it is the basis for this port.

Read its opening before trusting any constant. These are not instrument measurements of real hardware. They start from the author's memory of the real thing, are assembled against published specs, technical write-ups and photographs, then tuned until it looks right. The document marks what has a cited source and what is tuning, and it keeps the conclusions that were later withdrawn.

dmg-panel-color is the part that is a measurement — the panel colour checked against photographs of ten real units.

Licence

Apache License 2.0, the same as the project this is ported from.

Support

This is free, and it stays free. But it was a lot of measuring against real
hardware to get right, and if any of it is useful to you, a little help would
genuinely make me happy.

Sponsor @kathoc

No pressure at all — a star or a bug report is welcome too.