OverviewFilesCommitsIssuesDocsReleasesPeers

dc-terrain commits / 047a215

atlas: announce the transport from the point of emission, once
The GDScript marker could not see HBLK_USE_ATLAS or HBLK_ATLAS_W, because it scanned the GRAPH's compile_to_glsl_function() output while those consts are emitted into this generator's cached_glsl_. It printed "SSBO binding 13 (HBLK_ATLAS_W=?)" in BOTH arms of the A/B and proved nothing. _use_atlas() now announces once, where the flag is actually consulted, so the report cannot drift from what was emitted. It prints the raw env string too, so "the var never arrived" and "the var said 0" are distinguishable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
047a21526fb39b453b18677982471df09a81034c
by plankatron <fleeky@gmail.com> · 2026-09-03T16:52:30.000Z

Changed files (1) +15 -1

src/dc_terrain_generator_procnodes.cpp +15 -1
……@@ -539,7 +539,21 @@ void DCTerrainGeneratorProcNodes::set_graph(const Ref<Resource> &p_graph) {
539539// HBLK_USE_ATLAS=1 godot4 --path . --script res://scenes/test/...
540540static bool _use_atlas() {
541541 String v = OS::get_singleton()->get_environment("HBLK_USE_ATLAS");
542 return v == "1" || v.to_lower() == "true";
542 const bool on = (v == "1" || v.to_lower() == "true");
543 // REPORTED FROM HERE, ONCE, AND NOWHERE ELSE. The first attempt at this
544 // printed from GDScript by scanning g.compile_to_glsl_function(), which is
545 // the GRAPH's compiler output -- a DIFFERENT string from the cached_glsl_
546 // this generator assembles. The HBLK_* consts are not in it, so it reported
547 // "SSBO ... HBLK_ATLAS_W=?" in BOTH arms of the A/B and proved nothing.
548 // Printing at the point of emission cannot drift from what is emitted.
549 static bool announced = false;
550 if (!announced) {
551 announced = true;
552 UtilityFunctions::print("[DCTerrainGeneratorProcNodes] HBLK transport: ",
553 on ? "ATLAS binding 14" : "SSBO binding 13",
554 " (HBLK_USE_ATLAS=\"", v, "\", HBLK_ATLAS_W=", itos(DCCompute::ATLAS_W), ")");
555 }
556 return on;
543557}
544558
545559