fix(assets): remove unreferenced duplicate planet_surface texture

assets/textures/planet_surface.png was byte-identical to and unused
in favor of assets/models/nebula_planet_planet_surface.png, the
sidecar Godot's glTF importer actually extracted from nebula_planet.glb
and uses at runtime. Deleted the orphan (+ its .import) and stopped
gen_planet_surface.py from writing it.

Also measured nebula_dust.gdshader's per-fragment depth-texture sample
cost (~0.07ms/frame at 500 particles, within noise) -- negligible, so
no budgeting concern for further particle work.
This commit is contained in:
Josh Creek
2026-08-05 09:51:33 +01:00
parent 9bdeb73fa7
commit 401d882ff0
4 changed files with 11 additions and 76 deletions
+11 -15
View File
@@ -1,11 +1,11 @@
"""Generates Game/assets/textures/planet_surface.png (and the byte-identical
Game/assets/models/nebula_planet_planet_surface.png sidecar that actually feeds
the live nebula_planet.glb material -- Godot's glTF importer extracted the
embedded image there at import time, so the imported scene references that
external file, not the glb's internal binary): a 2048x1024 equirectangular
decorative planet with latitude bands, storm vortices, and a lit/unlit
terminator, via layered FFT/domain-warped noise in the same style as
gen_nebula_sky.py (helpers duplicated here to keep both scripts standalone).
"""Generates Game/assets/models/nebula_planet_planet_surface.png, the sidecar
that actually feeds the live nebula_planet.glb material -- Godot's glTF
importer extracted the embedded image there at import time, so the imported
scene references that external file, not the glb's internal binary. A
2048x1024 equirectangular decorative planet with latitude bands, storm
vortices, and a lit/unlit terminator, via layered FFT/domain-warped noise in
the same style as gen_nebula_sky.py (helpers duplicated here to keep both
scripts standalone).
"""
from pathlib import Path
@@ -178,12 +178,8 @@ color = np.clip(color, 0.0, 1.0)
print("saving planet surface...")
root = Path(__file__).resolve().parents[2]
out_paths = [
root / "Game" / "assets" / "textures" / "planet_surface.png",
root / "Game" / "assets" / "models" / "nebula_planet_planet_surface.png",
]
out_path = root / "Game" / "assets" / "models" / "nebula_planet_planet_surface.png"
img = Image.fromarray((color * 255).astype(np.uint8), "RGB")
for p in out_paths:
img.save(p)
print("saved:", p)
img.save(out_path)
print("saved:", out_path)
print("done")