OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps / scenes / test / gate_analytic_gradient.gd

25 lines · gd ref:
extends SceneTree
## SUPERSEDED — do not use. Kept as a signpost, not as a gate.
##
## This measured pn_out_grad's analytic normal against a central-difference one
## through the shader, and found 22.7% of samples within 5 deg. The follow-up
## isolation moved to C++, where it is faster and answers WHICH STAGE:
##
##   dc-terrain/tests/test_analytic_gradient.cpp
##   g++ -O2 -std=c++17 -I ../proc-nodes/src/shared \
##       -o /tmp/grad_gate tests/test_analytic_gradient.cpp
##
## That gate reports, per stage: grad_noised_2d 0.019 deg mean,
## fractal_noise_2d_lod 0.019, fractal_multifractal_2d_lod 2.15,
## erosion_node_eval_grad 29.2 -- and 5.5 -> 29.2 deg as octaves go 1 -> 7,
## which identifies the dropped d(combi_mask)/dp and d(fade_target)/dp inside
## erosion_filter as the mechanism.
##
## This script also referenced probe_mode / probe_detail / probe_erosion, which
## gen_density_shader.py no longer emits. Left as an exit(1) rather than deleted
## so it cannot rot into a gate that passes without testing anything -- the
## exact failure shader_probe.gd had.
func _initialize() -> void:
	print("SUPERSEDED — use dc-terrain/tests/test_analytic_gradient.cpp")
	quit(1)