Skip to content

Commit

Permalink
Minor edit world generation params
Browse files Browse the repository at this point in the history
  • Loading branch information
loryruta committed Sep 12, 2023
1 parent 7340d61 commit 85965bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/video/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void Renderer::on_frame(
)
);

/*
m_debug_draw_buffer.clear();
m_debug_draw_buffer.add_cube({
Expand All @@ -227,6 +228,7 @@ void Renderer::on_frame(
m_debug_draw_buffer,
true
));
*/

// Renders UI
if (m_ui_setup_function)
Expand Down
2 changes: 1 addition & 1 deletion src/video/Renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace explo
public:
static constexpr size_t k_chunk_draw_list_buffer_size = 8388608; // 8MB

VkClearColorValue m_background_color = VkClearColorValue{0.77f, 0.6f, 1.0f, 0.0f};
VkClearColorValue m_background_color = VkClearColorValue{0.32f, 0.933f, 1.0f, 0.0f};

explicit Renderer(GLFWwindow* m_window);
~Renderer();
Expand Down
3 changes: 2 additions & 1 deletion src/world/volume/PerlinNoiseGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ PerlinNoiseGenerator::~PerlinNoiseGenerator()

int PerlinNoiseGenerator::get_height_at(int x, int z)
{
double val = m_perlin_noise.noise2D(double(x) * 0.023, double(z) * 0.023);
const double k_frequency = 0.023;
double val = m_perlin_noise.noise2D(double(x) * k_frequency, double(z) * k_frequency);
return ((val + 1.0) / 2.0) * k_max_world_height;
}

Expand Down

0 comments on commit 85965bb

Please sign in to comment.