Skip to content

Clean every window and add the results into the region grids #35

Description

@KurbyDoo

Background

This ties the other three sub tickets together and is the point where the sampler actually produces a region.

Description

For each window position, cut the window out of the noise canvas, hand it to #23, then add the returned patch into the region grids at that same position using the weight grid from #33. Once every window has been added, read the finished grid back out and return it.

Take two things as arguments rather than building them in here:

  • a function that takes a patch and returns a cleaned patch
  • the region grids from Terrain Store #31

Take a function rather than the whole pipeline object. Cleaning a patch is the only thing needed from #23, so asking for only that is enough, and a test can then pass an ordinary function instead of building a fake class.

Do not take the tile cache. This never touches finished tiles.

Testing, passing a function that ignores its input and returns a patch of all fives:

  • Assert the finished grid is all fives everywhere, including the overlaps and the corners. If the overlaps read higher then the weights are not being divided out
  • Assert the finished grid is the region's full resolution size
  • Assert the function was called once per window position and no more
  • Assert the same seed and region run twice give identical grids

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions