| … | … | @@ -744,8 +744,8 @@ void DCTerrainGeneratorProcNodes::_recompile_glsl() { |
| 744 | 744 | " int i0 = int(floor(u)); int j0 = int(floor(v));\n" |
| 745 | 745 | " int i1 = min(i0 + 1, HBLK_N - 1); int j1 = min(j0 + 1, HBLK_N - 1);\n" |
| 746 | 746 | " float fu = u - float(i0); float fv = v - float(j0);\n" |
| 747 | | " float h00 = hblk_data[j0*HBLK_N + i0]; float h10 = hblk_data[j0*HBLK_N + i1];\n" |
| 748 | | " float h01 = hblk_data[j1*HBLK_N + i0]; float h11 = hblk_data[j1*HBLK_N + i1];\n" |
| 747 | " float h00 = custom_data[j0*HBLK_N + i0]; float h10 = custom_data[j0*HBLK_N + i1];\n" |
| 748 | " float h01 = custom_data[j1*HBLK_N + i0]; float h11 = custom_data[j1*HBLK_N + i1];\n" |
| 749 | 749 | " return mix(mix(h00, h10, fu), mix(h01, h11, fu), fv);\n" |
| 750 | 750 | "}\n" |
| 751 | 751 | "float evaluate_density(float x, float y, float z) {\n" |
| … | … | @@ -848,8 +848,11 @@ void DCTerrainGeneratorProcNodes::_recompile_glsl() { |
| 848 | 848 | // ONLY for the generator's OWN heightfield_path. When the data came from a |
| 849 | 849 | // NODE, that node emits its own sampler in its prelude -- emitting a second |
| 850 | 850 | // one here is a redefinition, and this older copy still names the buffer |
| 851 | | // hblk_data, which no longer exists now that dc-terrain transports opaque |
| 852 | | // custom_data. Left in place for the pre-node path rather than deleted. |
| 851 | // custom_data. FIXED: it named the buffer hblk_data, which stopped existing |
| 852 | // when dc-terrain moved to opaque custom_data. #55 section 2.3 recorded this |
| 853 | // as fixed; it was not, and the heightfield_only isolation oracle failed to |
| 854 | // compile on EVERY run -- "Custom shader failed, falling back" -- which is |
| 855 | // what made the map's own GPU/CPU oracle report a 9.1 m disagreement. |
| 853 | 856 | if (hblk_n_ > 0 && !heightfield_path_.is_empty()) { |
| 854 | 857 | // The sampler alone — HBLK_* consts plus hblk_height_m. Split out because |
| 855 | 858 | // the lookdev path needs ONLY this: erosion_wrapper_glsl emits its own |
| … | … | @@ -869,8 +872,8 @@ void DCTerrainGeneratorProcNodes::_recompile_glsl() { |
| 869 | 872 | " int i0 = int(floor(u)); int j0 = int(floor(v));\n" |
| 870 | 873 | " int i1 = min(i0 + 1, HBLK_N - 1); int j1 = min(j0 + 1, HBLK_N - 1);\n" |
| 871 | 874 | " float fu = u - float(i0); float fv = v - float(j0);\n" |
| 872 | | " float h00 = hblk_data[j0*HBLK_N + i0]; float h10 = hblk_data[j0*HBLK_N + i1];\n" |
| 873 | | " float h01 = hblk_data[j1*HBLK_N + i0]; float h11 = hblk_data[j1*HBLK_N + i1];\n" |
| 875 | " float h00 = custom_data[j0*HBLK_N + i0]; float h10 = custom_data[j0*HBLK_N + i1];\n" |
| 876 | " float h01 = custom_data[j1*HBLK_N + i0]; float h11 = custom_data[j1*HBLK_N + i1];\n" |
| 874 | 877 | " return mix(mix(h00, h10, fu), mix(h01, h11, fu), fv);\n" |
| 875 | 878 | "}\n" |
| 876 | 879 | // The five names erosion_heightmap_gn_glsl() reads. EN_HAMP is the |