PGXP seam expansion for opaque 3D polygons (opt-in)

[video] pgxp_seam = "off" | "fine" | "wide" (default off; PSX_PGXP_SEAM,
PSX_PGXP_SEAM_PX). Above 1x, a vertex that sits on a neighbour's edge only to
the PS1's precision leaves a hairline crack. Opaque 3D triangles move each
edge outward (mitred, limited at sharp corners): fine = 1 output px, wide =
half a native px; UVs, colour, q and SZ extrapolate with the barycentric
coordinates of the new corners so textures do not slide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shokunin
2026-10-07 13:09:02 -07:00
parent 7d56562066
commit 28fdd27b66
7 changed files with 185 additions and 13 deletions
+7
View File
@@ -802,6 +802,13 @@ static RuntimeConfig parse_runtime_block(const toml::value& cfg, const fs::path&
rt.video_pgxp_color_correction = toml::find<bool>(video, "pgxp_color_correction");
if (video.contains("pgxp_depth_threshold"))
rt.video_pgxp_depth_threshold = toml::find<double>(video, "pgxp_depth_threshold");
if (video.contains("pgxp_seam")) {
const auto m = toml::find<std::string>(video, "pgxp_seam");
if (m == "off") rt.video_pgxp_seam = 0;
else if (m == "fine") rt.video_pgxp_seam = 1;
else if (m == "wide") rt.video_pgxp_seam = 2;
else throw std::runtime_error("[video] pgxp_seam must be \"off\", \"fine\" or \"wide\"");
}
if (video.contains("pgxp_mod_only")) {
rt.video_pgxp_mod_only = toml::find<bool>(video, "pgxp_mod_only");
}