diff options
| author | Mel <einebeere@gmail.com> | 2024-02-06 02:09:17 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-02-06 02:09:17 +0100 |
| commit | c61e09ce986fa99debea040a7c0ac42749ad8052 (patch) | |
| tree | 177b39f7f692723cb4ace8392349f3f8f0d2192b /src/Math/Perlin.cpp | |
| parent | 091bf9e418ffdcf36e1735ed78d544f3d1b86785 (diff) | |
| download | meowcraft-c61e09ce986fa99debea040a7c0ac42749ad8052.tar.zst meowcraft-c61e09ce986fa99debea040a7c0ac42749ad8052.zip | |
Render outlines on currently targeted blocks
Diffstat (limited to 'src/Math/Perlin.cpp')
| -rw-r--r-- | src/Math/Perlin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Math/Perlin.cpp b/src/Math/Perlin.cpp index 992a08e..9a1c9f8 100644 --- a/src/Math/Perlin.cpp +++ b/src/Math/Perlin.cpp @@ -24,10 +24,10 @@ Vector<2> gradient(Vector<2> pos) { } Real raw(Vector<2> pos) { - auto cell = grid_cell_for_point(pos); + auto cell = grid_cell_containing_point(pos); auto uv = pos - cell.top_left(); - auto unit = grid_cell_for_point({}); + auto unit = grid_cell_containing_point({}); auto l11 = unit.top_left() - uv; auto l21 = unit.top_right() - uv; auto l12 = unit.bottom_left() - uv; @@ -58,10 +58,10 @@ Vector<3> gradient(Vector<3> pos) { } Real raw(Vector<3> pos) { - auto cell = cube_cell_for_point(pos); + auto cell = cube_cell_containing_point(pos); auto uv = pos - cell.front_top_left(); - auto unit = cube_cell_for_point({}); + auto unit = cube_cell_containing_point({}); auto l111 = unit.front_top_left() - uv; auto l211 = unit.front_top_right() - uv; auto l121 = unit.front_bottom_left() - uv; |
