Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89aafe2b43 | ||
|
|
2a3befd970 |
@@ -1,77 +0,0 @@
|
|||||||
name: Commit V36 Retail Soft decode
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- test/v36-retail-jfa-soft
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
commit-v36-soft:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: test/v36-retail-jfa-soft
|
|
||||||
|
|
||||||
- name: Apply V36 decode
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
python3 <<'PY'
|
|
||||||
from pathlib import Path
|
|
||||||
p = Path('src/outline/d3d9_hook.zig')
|
|
||||||
s = p.read_text()
|
|
||||||
if 'V36 RETAIL-SOFT' in s:
|
|
||||||
raise SystemExit(0)
|
|
||||||
start = s.index('/// V32 POLISH: hard 3px outline, no feather.')
|
|
||||||
end = s.index('/// Debug: composite silhouette RT directly.')
|
|
||||||
lines = [
|
|
||||||
'/// V36 RETAIL-SOFT: keep the proven V34 JFA, soften only final decode.',
|
|
||||||
'/// c0 = (screen_width, screen_height, core_radius_px, halo_radius_px).',
|
|
||||||
'/// Uses the same two texture reads as V34: no 17-tap full-screen morphology.',
|
|
||||||
'const jfa_decode_src =',
|
|
||||||
' "ps_3_0\\n" ++',
|
|
||||||
' "def c1, 0.0, 0.22, 0.82, -0.002\\n" ++',
|
|
||||||
' "def c2, 1.0, 0.95, 0.58, 0.0\\n" ++',
|
|
||||||
' "dcl_2d s0\\n" ++',
|
|
||||||
' "dcl_2d s1\\n" ++',
|
|
||||||
' "dcl_texcoord0 v0\\n" ++',
|
|
||||||
' "texld r0, v0, s0\\n" ++',
|
|
||||||
' "sub r1.xy, v0.xy, r0.xy\\n" ++',
|
|
||||||
' "mul r1.xy, r1.xy, c0.xy\\n" ++',
|
|
||||||
' "dp2add r1.z, r1, r1, c1.x\\n" ++',
|
|
||||||
' "mul r3.x, c0.z, c0.z\\n" ++',
|
|
||||||
' "mul r3.y, c0.w, c0.w\\n" ++',
|
|
||||||
' "sub r4.x, r1.z, r3.y\\n" ++',
|
|
||||||
' "cmp r6.w, r4.x, c1.x, c1.y\\n" ++',
|
|
||||||
' "sub r4.x, r1.z, r3.x\\n" ++',
|
|
||||||
' "cmp r6.w, r4.x, r6.w, c1.z\\n" ++',
|
|
||||||
' "texld r5, v0, s1\\n" ++',
|
|
||||||
' "add r5.x, r5.a, c1.w\\n" ++',
|
|
||||||
' "cmp r6.w, r5.x, c1.x, r6.w\\n" ++',
|
|
||||||
' "mov r6.xyz, c2.xyz\\n" ++',
|
|
||||||
' "mov oC0, r6\\n";',
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
]
|
|
||||||
s = s[:start] + '\n'.join(lines) + s[end:]
|
|
||||||
old = ' // V34: hard 3px edge unchanged; JFA seed precision is now full-float.\n c0 = [4]f32{ fw, fh, 3.0, 0.0 };'
|
|
||||||
new_cpu = ' // V36: thin 1.5px core plus a subtle 3px halo.\n c0 = [4]f32{ fw, fh, 1.5, 3.0 };'
|
|
||||||
if old not in s:
|
|
||||||
raise SystemExit('V34 CPU decode constants not found')
|
|
||||||
p.write_text(s.replace(old, new_cpu))
|
|
||||||
PY
|
|
||||||
|
|
||||||
- name: Commit source
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
if git diff --quiet; then exit 0; fi
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
git add src/outline/d3d9_hook.zig
|
|
||||||
git commit -m "V36: soft Retail-style JFA decode"
|
|
||||||
git push origin HEAD:test/v36-retail-jfa-soft
|
|
||||||
+8
-9
@@ -1,9 +1,9 @@
|
|||||||
name: V36 ExitFix Baseline
|
name: V34 ExitFix Baseline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- test/v36-exitfix-baseline
|
- test/v34-exitfix-baseline
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -40,16 +40,15 @@ jobs:
|
|||||||
cp src/outline/addon/Outline.lua package/Interface/AddOns/WeirdUtils_Outline/
|
cp src/outline/addon/Outline.lua package/Interface/AddOns/WeirdUtils_Outline/
|
||||||
cp src/outline/addon/WeirdUtils_Outline.toc package/Interface/AddOns/WeirdUtils_Outline/
|
cp src/outline/addon/WeirdUtils_Outline.toc package/Interface/AddOns/WeirdUtils_Outline/
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'V36 runtime + process-exit safety only.' \
|
'V34 stable + process-exit safety only.' \
|
||||||
'Base runtime commit: 4bbee94388f98843b738e275fd9482576be80654.' \
|
'Runtime Outline code is otherwise identical to stable/outline-v34-autofix.' \
|
||||||
'Compared with V34, only src/outline/d3d9_hook.zig changes runtime behavior.' \
|
'main is untouched.' \
|
||||||
'main branch is untouched.' \
|
|
||||||
'WeirdPerformance is disabled in this standalone build and not modified.' \
|
'WeirdPerformance is disabled in this standalone build and not modified.' \
|
||||||
> package/README_TEST.txt
|
> package/README_TEST.txt
|
||||||
(cd package && sha256sum DLL/outline.dll > SHA256SUMS.txt && zip -r ../dist/WeirdUtils_V36_EXITFIX_BASELINE.zip DLL Interface README_TEST.txt SHA256SUMS.txt)
|
(cd package && sha256sum DLL/outline.dll > SHA256SUMS.txt && zip -r ../dist/WeirdUtils_V34_EXITFIX_BASELINE.zip DLL Interface README_TEST.txt SHA256SUMS.txt)
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: WeirdUtils-V36-EXITFIX-BASELINE
|
name: WeirdUtils-V34-EXITFIX-BASELINE
|
||||||
path: dist/WeirdUtils_V36_EXITFIX_BASELINE.zip
|
path: dist/WeirdUtils_V34_EXITFIX_BASELINE.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
+4
-1
@@ -1053,7 +1053,10 @@ pub export fn DllMain(
|
|||||||
switch (reason) {
|
switch (reason) {
|
||||||
1 => install(),
|
1 => install(),
|
||||||
0 => {
|
0 => {
|
||||||
// Process-exit safety only; runtime Outline behavior is unchanged.
|
// Process-exit safety: when Windows is terminating the whole
|
||||||
|
// process, do not call heavy cleanup from DLL_PROCESS_DETACH.
|
||||||
|
// Resources are reclaimed by the OS. Explicit FreeLibrary still
|
||||||
|
// performs the normal uninstall path.
|
||||||
if (reserved == null) uninstall();
|
if (reserved == null) uninstall();
|
||||||
},
|
},
|
||||||
else => {},
|
else => {},
|
||||||
|
|||||||
+21
-18
@@ -732,31 +732,34 @@ const jfa_prop_src =
|
|||||||
"mov oC0.xy, r8.xy\n" ++
|
"mov oC0.xy, r8.xy\n" ++
|
||||||
"mov oC0.zw, c1.xx\n";
|
"mov oC0.zw, c1.xx\n";
|
||||||
|
|
||||||
/// V36 RETAIL-SOFT: keep the proven V34 JFA, soften only final decode.
|
/// V32 POLISH: hard 3px outline, no feather.
|
||||||
/// c0 = (screen_width, screen_height, core_radius_px, halo_radius_px).
|
/// c0 = (screen_width, screen_height, radius_px=3, 0).
|
||||||
/// Uses the same two texture reads as V34: no 17-tap full-screen morphology.
|
/// The shader squares radius_px and emits a binary 0/1 edge alpha.
|
||||||
const jfa_decode_src =
|
const jfa_decode_src =
|
||||||
"ps_3_0\n" ++
|
"ps_3_0\n" ++
|
||||||
"def c1, 0.0, 0.22, 0.82, -0.002\n" ++
|
"def c1, 0.0, 1.0, -0.002, 0.0\n" ++
|
||||||
"def c2, 1.0, 0.95, 0.58, 0.0\n" ++
|
|
||||||
"dcl_2d s0\n" ++
|
"dcl_2d s0\n" ++
|
||||||
"dcl_2d s1\n" ++
|
"dcl_2d s1\n" ++
|
||||||
"dcl_texcoord0 v0\n" ++
|
"dcl_texcoord0 v0\n" ++
|
||||||
|
// Nearest seed and pixel-space squared distance.
|
||||||
"texld r0, v0, s0\n" ++
|
"texld r0, v0, s0\n" ++
|
||||||
"sub r1.xy, v0.xy, r0.xy\n" ++
|
"sub r1.xy, v0.xy, r0.xy\n" ++
|
||||||
"mul r1.xy, r1.xy, c0.xy\n" ++
|
"mul r1.xy, r1.xy, c0.xy\n" ++
|
||||||
"dp2add r1.z, r1, r1, c1.x\n" ++
|
"dp2add r1.z, r1, r1, c0.w\n" ++
|
||||||
"mul r3.x, c0.z, c0.z\n" ++
|
// Seed colour.
|
||||||
"mul r3.y, c0.w, c0.w\n" ++
|
"texld r2, r0, s1\n" ++
|
||||||
"sub r4.x, r1.z, r3.y\n" ++
|
// Hard radius test: dist² < radius² => alpha 1, otherwise 0.
|
||||||
"cmp r6.w, r4.x, c1.x, c1.y\n" ++
|
"mov r3.x, c0.z\n" ++
|
||||||
"sub r4.x, r1.z, r3.x\n" ++
|
"mul r3.x, r3.x, r3.x\n" ++
|
||||||
"cmp r6.w, r4.x, r6.w, c1.z\n" ++
|
"sub r3.y, r1.z, r3.x\n" ++
|
||||||
|
"mov r6.w, c1.y\n" ++
|
||||||
|
"cmp r4.w, r3.y, c0.w, r6.w\n" ++
|
||||||
|
// Do not paint over the model interior.
|
||||||
"texld r5, v0, s1\n" ++
|
"texld r5, v0, s1\n" ++
|
||||||
"add r5.x, r5.a, c1.w\n" ++
|
"add r5.x, r5.a, c1.z\n" ++
|
||||||
"cmp r6.w, r5.x, c1.x, r6.w\n" ++
|
"cmp r4.w, r5.x, c0.w, r4.w\n" ++
|
||||||
"mov r6.xyz, c2.xyz\n" ++
|
"mov r4.xyz, r2.xyz\n" ++
|
||||||
"mov oC0, r6\n";
|
"mov oC0, r4\n";
|
||||||
|
|
||||||
/// Debug: composite silhouette RT directly. Forces alpha to 1.0 where silhouette
|
/// Debug: composite silhouette RT directly. Forces alpha to 1.0 where silhouette
|
||||||
/// has any content (alpha >= 0.002), 0.0 elsewhere. Bypasses JFA entirely.
|
/// has any content (alpha >= 0.002), 0.0 elsewhere. Bypasses JFA entirely.
|
||||||
@@ -1414,8 +1417,8 @@ fn runJfaPipeline(device: *anyopaque) void {
|
|||||||
if (saved_rt0) |rt| deviceSetRenderTarget(device, 0, rt);
|
if (saved_rt0) |rt| deviceSetRenderTarget(device, 0, rt);
|
||||||
deviceSetTexture(device, 0, rt_jfa_a_tex);
|
deviceSetTexture(device, 0, rt_jfa_a_tex);
|
||||||
deviceSetTexture(device, 1, rt_silhouette_tex);
|
deviceSetTexture(device, 1, rt_silhouette_tex);
|
||||||
// V36: thin 1.5px core plus a subtle 3px halo.
|
// V34: hard 3px edge unchanged; JFA seed precision is now full-float.
|
||||||
c0 = [4]f32{ fw, fh, 1.5, 3.0 };
|
c0 = [4]f32{ fw, fh, 3.0, 0.0 };
|
||||||
deviceSetPSConstF(device, 0, &c0);
|
deviceSetPSConstF(device, 0, &c0);
|
||||||
deviceSetPtr(device, types.VT.SetPixelShader, jfa_decode_ps.?);
|
deviceSetPtr(device, types.VT.SetPixelShader, jfa_decode_ps.?);
|
||||||
deviceSetRS(device, types.D3DRS.ALPHABLENDENABLE, 1);
|
deviceSetRS(device, types.D3DRS.ALPHABLENDENABLE, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user