Page 1 of 1

[Genhis][2.0.65] Noise expression multisample not working as described/intended.

Posted: Sat Aug 30, 2025 6:50 am
by Schmendrick
What did you do?
Used multisample in a noise expression, expected it to provide values from an offset version of the primary expression.
What happened?
Regardless of what values are used as offsets, "multisample(foo,X,Y)" always seems to evaluate to "foo."
What did you expect to happen instead? It might be obvious to you, but do it anyway!
Expected "multisample(vulcanus_basalt_lakes, 1, 0)" at (-187,41) to evaluate to the same value as "multisample(vulcanus_basalt_lakes, 0, 0)" at (-186,41)
Does it happen always, once, or sometimes?
Always.

To reproduce:

Code: Select all

  { type = "noise-expression", name = "multi_00",
	expression = "multisample(vulcanus_basalt_lakes, 0, 0)",
  },
  { type = "noise-expression", name = "multi_01",
	expression = "multisample(vulcanus_basalt_lakes, 0, 1)",
  },
  { type = "noise-expression", name = "multi_10",
	expression = "multisample(vulcanus_basalt_lakes, 1, 0)",
  },
  { type = "noise-expression", name = "multi_11",
	expression = "multisample(vulcanus_basalt_lakes, 1, 1)",
  },
and then run around sampling tiles with LuaSurface.calculate_tile_properties.

If this is not a bug and I am somehow missing how it is supposed to work, the documentation could use a little more description/explanation.

Re: [Genhis][2.0.65] Noise expression multisample not working as described/intended.

Posted: Sat Sep 06, 2025 12:29 pm
by Genhis
Thanks for the report. Multisample noise operation wasn't implemented properly for arbitrary positions without a grid, so it copied the result from the same tile when you called the lua function. It is fixed for 2.0.67.