The 2-phase decode passes took their unrolled branch on any GLES, but
it pastes tokens, which GLES forbids, so none of the presets built on
them compiled there. GLES 3 can run the array loop that desktop GL
uses, as the 3-phase passes already do; keep the unrolled branch for
GLES 2 only.
GLES rejected every pass. The sources define "const" away, so their
global "static const" values become globals initialised from other
globals, which ESSL doesn't allow, and they lean on desktop GLSL's
implicit int to float conversions and default float precision.
Turn the affected globals into typed macros, convert the ints
explicitly, and give the passes a default precision on GLES only.
Desktop GL compiles the same as before.
* 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]>
* xBRZ freescale multipass: add minimum contrast, threshold parameters and port fixes
Add an xbrz-crisp preset that uses the same two passes with a minimum
contrast of 16, equal color tolerance 15 and steep/shallow threshold 3.0.
The multipass defaults keep the current look: the new parameters default
to 0, 30 and 2.2. The output pass now applies the four corners in the
order of the reference xBRZ, resolves blend color ties the same way, and
takes the output scale from the image size instead of the texture size.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NoUuzh3YspgqPacroVBWQ7
* xBRZ freescale multipass: default to tolerance 15 and steep threshold 3.0
At tolerance 30 small dark holes in stone textures get merged into the
surrounding color, and at 2.2 a 1-pixel step on a vertical edge is read
as a sloped line. 15 and 3.0 keep both closer to the original art. The
xbrz-crisp preset now only sets the minimum contrast. The old look is
still available with XBRZ_TOL 30 and XBRZ_STEEP 2.2.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NoUuzh3YspgqPacroVBWQ7
---------
Co-authored-by: Michel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
The clamp added in 7bf5101 assigned a vec4 texture read to a vec3, which
strict compilers such as Mesa's reject, and tested gl_FragCoord, which is
in pixels, against 0..1, which blacked out all but the first pixel.
Read .rgb and test the texture coordinate as a fraction of the picture.
The vertex shader declared a local tile_uv_wrap, which hid the varying of
the same name, so the fragment shader tested an undefined value. Mesa
reads it as 0 on GLES and the pass draws; on desktop GL every fragment
was discarded, leaving the phosphor mask and the picture black.
* Add files via upload
* Add files via upload
* crt-pi revert to original
* crt-geom set defaults as in slang
* zfast_crt_composite, correct some errors
This changes the cp operation to work on more platforms/environments,
where the -t option is not available. Additionally remove the .git and
.gitlab-ci.yml files after installation.
Add PT_SHADOW_BLUR_MODE parameter with three options:
- 0=Off: No blur samples (3 total texture samples)
- 1=Lite: 5-sample cross pattern (8 total samples)
- 2=Full: 9-sample grid pattern (12 total samples)
Allows users on devices like TRIMUI Brick Hammer or Anbernic RG35XX
to reduce texture samples for better frame rates while keeping
drop shadows enabled.
* Add pixel_transparency shader for GBC/GBA transparency simulation
Converts bright/white pixels to transparent areas showing a procedural
paper background, simulating the look of original Game Boy screens
without backlights.
Features:
- Multiple transparency modes (white only, bright pixels, all pixels)
- Procedural paper grain background with tint options
- Drop shadows with configurable blur
- Color harshness filter (Gambatte-style)
Includes base preset and 5 LCD shader combinations:
- lcd1x, lcd3x, zfast_lcd, lcd-grid-v2, authentic_gbc_fast
Ported from Slang version with GLSL ES compatibility fixes.
* Add scale_type0 = viewport to LCD shader presets
Adds missing scale_type0 = viewport to 15 LCD/grid shader presets
to match slang-shaders equivalents. This enables proper shader
appending behavior when combining LCD shaders with other effects
like pixel_transparency.
Affected presets:
- lcd1x, lcd3x, zfast-lcd, lcd-grid
- lcd1x_nds, lcd1x_psp
- simpletex_lcd variants (9 files)
* Add BACKGROUND_INTENSITY parameter to simpletex_lcd shaders
Ports the BACKGROUND_INTENSITY parameter from slang-shaders to all
simpletex_lcd GLSL shader variants. This parameter controls the
visibility of the paper background texture (0.0 = none, 1.0 = full).
Also adds pixel_transparency-simpletex_lcd.glslp combo preset with
background intensity disabled.
* re-write zfast_crt_composite to something better (probably)
Did some experiments with filtering, scanlines, performance etc and this is the outcome
* Update zfast-composite.glslp