MichelandMichel e80b60a84b xBRZ freescale multipass: lighter output pass, new defaults, diagonal rules and contrast 24 for xbrz-crisp (#577)
* xBRZ freescale multipass: lighter output pass, dominant 3.8 and steep 3.2

The first pass now makes every blend decision once per input pixel (blend
type, line type, blend color and the minimum contrast), so the output pass
reads two textures instead of six where no corner is cut and computes no
color distances. The output is identical at the same thresholds.

Defaults change from dominant direction 3.6 and steep/shallow line 3.0 to
3.8 and 3.2, which keeps 1-pixel steps and small corners closer to the
original art. XBRZ_DOM is now a parameter; the unused blend_* parameters
and XBRZ_MINC_RAMP are removed.

* xBRZ freescale multipass: similar diagonal rules for xbrz-crisp

New XBRZ_DIAG parameter, off (0) by default, so plain xBRZ doesn't change.
When it is on, a corner stays square if the two colors its cut would join
differ by more than XBRZ_DIAG, so a junction of three colors is not pulled
into a fake diagonal (an idea from torcado's cleanEdge). Antialiasing ramps
use a limit of 92, shallow and steep lines are never blocked, a blocked
corner is still cut when a neighbor on the same diagonal is cut, and where
stacked 1-pixel stripes end flush (health bars, gauges) the end corners
stay square. The xbrz-crisp preset sets XBRZ_DIAG to 100.

* xBRZ freescale multipass: minimum contrast 24 in xbrz-crisp

The xbrz-crisp preset now sets XBRZ_MINC to 24 instead of 16, so grass,
foliage and other textures keep more of their pixels. Plain
xbrz-freescale-multipass doesn't change (XBRZ_MINC stays 0).

* xBRZ freescale multipass: fix the output pass with a larger original texture

RetroArch's gl driver rounds the original frame and the first pass up to a
power of two on their own (512 and 256 with snes9x), so the second pass read
the original at the wrong place and the picture shrank into a corner. Each
texture is now read with its own size. No change where both sizes match
(0 px on 100 screens).

---------

Co-authored-by: Michel <[email protected]>
2026-10-21 22:41:29 -05:00
2025-08-17 08:59:39 -05:00
2025-02-26 16:12:14 -06:00
2025-06-06 14:31:28 -05:00
2023-05-17 19:54:31 -05:00
2023-10-13 13:37:07 -05:00
2025-01-23 22:19:22 +01:00
2019-06-03 10:07:29 -05:00
2024-12-23 15:49:25 -06:00
2019-06-03 10:07:29 -05:00
2022-04-17 05:21:54 +10:00
2020-01-22 15:21:27 -06:00
2023-09-30 08:39:31 -05:00
2022-04-17 05:21:54 +10:00
2022-04-17 05:21:54 +10:00
2023-05-17 19:54:31 -05:00
2019-06-03 10:07:29 -05:00
2018-10-25 22:30:12 -05:00
2019-06-03 10:07:29 -05:00
2023-05-17 19:54:31 -05:00
2023-05-17 19:54:31 -05:00
2026-08-30 11:19:07 -05:00
2019-06-03 10:07:29 -05:00
2020-12-22 10:17:43 +00:00
2017-07-24 22:00:20 -04:00
2019-06-25 16:22:11 -05:00
S
Description
This repo is for glsl shaders converted by hand from libretro's common-shaders repo, since some don't play nicely with the cg2glsl script.
66 MiB
0 Stars 1 Watchers 0 Forks
Languages
GLSL 91.6%
C 8.4%