| … | … | @@ -1,6 +1,7 @@ |
| 1 | 1 | #include "gpu_compiler.h" |
| 2 | 2 | #include "erosion_filter_glsl.gen.h" |
| 3 | 3 | #include "hypso_curve_glsl.gen.h" |
| 4 | #include "proc_simplex_glsl.gen.h" |
| 4 | 5 | #include <godot_cpp/classes/rd_shader_source.hpp> |
| 5 | 6 | #include <godot_cpp/classes/rd_shader_spirv.hpp> |
| 6 | 7 | #include "../graph/proc_node_graph.h" |
| … | … | @@ -43,6 +44,7 @@ String GpuCompiler::get_erosion_library_glsl() { |
| 43 | 44 | // the wrapper is its only caller. Free when unused -- an uncalled GLSL |
| 44 | 45 | // function costs nothing after dead-code elimination. |
| 45 | 46 | + String(HYPSO_CURVE_GLSL) |
| 47 | + String(PROC_SIMPLEX_GLSL) |
| 46 | 48 | // Wrapper-supplied inputs to ErosionNoiseNode, declared here so a shader |
| 47 | 49 | // that never sets them still compiles and still behaves exactly as before |
| 48 | 50 | // (zero offset, runevision's 0.6 divisor). Same pattern as pn_max_octaves. |
| … | … | @@ -70,6 +72,13 @@ String GpuCompiler::get_erosion_library_glsl() { |
| 70 | 72 | // test_erosion_parity stays bit-identical. |
| 71 | 73 | + String("float pn_out_ridge = 0.0;\n") |
| 72 | 74 | + String("vec2 pn_out_grad = vec2(0.0);\n") |
| 75 | // EROSION IS A SUBAERIAL PROCESS. Rain and rivers carve land; a seabed |
| 76 | // is shaped by the base topology and deposition, not by gullies. The |
| 77 | // wrapper sets this from the column's depth and the erosion node scales |
| 78 | // its strength by it -- at 0 erosion_filter returns its input unchanged |
| 79 | // (delta and magnitude both vanish), so the seabed is the mountain and |
| 80 | // hypso curve alone, with the submarine term supplying its own relief. |
| 81 | + String("float pn_erosion_mask = 1.0;\n") |
| 73 | 82 | // EVERY REMAINING FILTER KNOB, as a wrapper-settable global. |
| 74 | 83 | // |
| 75 | 84 | // These were baked literals inside erosion_node_eval because |