diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 19:07:53 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 19:07:53 +0100 |
| commit | 46a196cde9328e2a232ee15c19556eb962cda0ab (patch) | |
| tree | d1cd03326530912d925ee1a7ba7fa735006f004f /tools/first_light.py | |
| parent | d3fab00a78967adf357596996190afdf33dc09d5 (diff) | |
| parent | ec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff) | |
Merge upstream main into first-light shader identity
Diffstat (limited to 'tools/first_light.py')
| -rw-r--r-- | tools/first_light.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/first_light.py b/tools/first_light.py index c81c1d6d7..bb720fe20 100644 --- a/tools/first_light.py +++ b/tools/first_light.py | |||
| @@ -460,6 +460,15 @@ def main(argv=None) -> int: | |||
| 460 | os.path.join(work, "first_light", "spirv", f"{stem}.spv"), | 460 | os.path.join(work, "first_light", "spirv", f"{stem}.spv"), |
| 461 | os.path.join(out_dir, f"{stage}.spv"), | 461 | os.path.join(out_dir, f"{stage}.spv"), |
| 462 | ) | 462 | ) |
| 463 | # For d3d12_first_light_test: the game's containers (the PSO finds each stage by the FSSM hash inside) and | ||
| 464 | # the translator's index entries, keyed vs/ps so the runtime's shader library reads vs.spv and ps.spv here. | ||
| 465 | for entry in picked: | ||
| 466 | shutil.copy( | ||
| 467 | os.path.join(work, "shaders", "dxbc", entry["file"]), | ||
| 468 | os.path.join(out_dir, f"{entry['stage']}.dxbc"), | ||
| 469 | ) | ||
| 470 | with open(os.path.join(out_dir, "index.json"), "w", encoding="utf-8", newline="\n") as f: | ||
| 471 | json.dump({"vs": meta["vs"], "ps": meta["ps"]}, f, indent=1) | ||
| 463 | vertices, indices = read_obj(a.obj) if a.obj else ([], []) | 472 | vertices, indices = read_obj(a.obj) if a.obj else ([], []) |
| 464 | obj_sha256 = None | 473 | obj_sha256 = None |
| 465 | if a.obj: | 474 | if a.obj: |
| @@ -501,7 +510,14 @@ def main(argv=None) -> int: | |||
| 501 | "clear_pixel": clear, | 510 | "clear_pixel": clear, |
| 502 | "uv_probes": probes, | 511 | "uv_probes": probes, |
| 503 | "clear": -1.0, | 512 | "clear": -1.0, |
| 504 | "files": {"vs": "vs.spv", "ps": "ps.spv", "mesh": "mesh.bin"}, | 513 | "files": { |
| 514 | "vs": "vs.spv", | ||
| 515 | "ps": "ps.spv", | ||
| 516 | "mesh": "mesh.bin", | ||
| 517 | "vs_dxbc": "vs.dxbc", | ||
| 518 | "ps_dxbc": "ps.dxbc", | ||
| 519 | "index": "index.json", | ||
| 520 | }, | ||
| 505 | } | 521 | } |
| 506 | with open(os.path.join(out_dir, "manifest.json"), "w", encoding="utf-8", newline="\n") as f: | 522 | with open(os.path.join(out_dir, "manifest.json"), "w", encoding="utf-8", newline="\n") as f: |
| 507 | json.dump(manifest, f, indent=1) | 523 | json.dump(manifest, f, indent=1) |