From d291ef11be07693f12632cc8c860bd06153a3ee5 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Thu, 7 Nov 2024 01:58:46 +0000 Subject: [PATCH] Fix typo in Distance3D shader generation --- doc/source/changelog.md | 1 + generators/graph/nodes/math_vectors.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/changelog.md b/doc/source/changelog.md index fa424fd79..bb6a627ef 100644 --- a/doc/source/changelog.md +++ b/doc/source/changelog.md @@ -28,6 +28,7 @@ Primarily developped with Godot 4.3. - `VoxelGeneratorGraph`: - Fixed wrong values when using `OutputWeight` with optimized execution map enabled, when weights are determined to be locally constant - Fixed occasional holes in terrain when using `FastNoise3D` nodes with the `OpenSimplex2S` noise type + - Fixed shader generation error when using the `Distance3D` node (vec2 instead of vec3, thanks to scwich) - `VoxelMesherTransvoxel`: revert texturing logic that attempted to prevent air voxels from contributing, but was lowering quality. It is now optional as an experimental property. - `VoxelStreamSQLite`: Fixed "empty size" errors when loading areas with edited `VoxelInstancer` data - `.vox` scene importer: disabled threaded import to workaround the editor freezing when saving meshes diff --git a/generators/graph/nodes/math_vectors.h b/generators/graph/nodes/math_vectors.h index 993fdb832..f0a3b5000 100644 --- a/generators/graph/nodes/math_vectors.h +++ b/generators/graph/nodes/math_vectors.h @@ -87,7 +87,7 @@ void register_math_vector_nodes(Span types) { }; t.shader_gen_func = [](ShaderGenContext &ctx) { ctx.add_format( - "{} = distance(vec3({}, {}, {}), vec2({}, {}, {}));\n", + "{} = distance(vec3({}, {}, {}), vec3({}, {}, {}));\n", ctx.get_output_name(0), ctx.get_input_name(0), ctx.get_input_name(1),