mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat: include for glsl (#24)
* refactor(gameplay): remove unused includes and members, clear vertex data after upload * feat(shader-tools): add recursive #include support for shader sources * refactor(shaders): extract noise and sky color functions into shared GLSL includes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Cubed/gameplay/chunk_pos.hpp"
|
||||
#include "Cubed/gameplay/path_point.hpp"
|
||||
#include "Cubed/tools/cubed_random.hpp"
|
||||
|
||||
@@ -9,8 +8,6 @@
|
||||
namespace Cubed {
|
||||
|
||||
class CavePath {
|
||||
using ChunkPosSet =
|
||||
tbb::concurrent_hash_map<ChunkPos, bool, ChunkPos::TBBHash>;
|
||||
|
||||
public:
|
||||
CavePath(unsigned int chunk_seed, unsigned world_seed,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Cubed/gameplay/chunk_pos.hpp"
|
||||
#include "Cubed/gameplay/path_point.hpp"
|
||||
#include "Cubed/tools/cubed_random.hpp"
|
||||
|
||||
@@ -9,8 +8,6 @@
|
||||
|
||||
namespace Cubed {
|
||||
class RiverPath {
|
||||
using ChunkPosSet =
|
||||
tbb::concurrent_hash_map<ChunkPos, bool, ChunkPos::TBBHash>;
|
||||
|
||||
public:
|
||||
RiverPath(unsigned int chunk_seed, unsigned world_seed,
|
||||
@@ -46,8 +43,6 @@ private:
|
||||
Random m_random;
|
||||
|
||||
std::vector<PathPoint> m_points;
|
||||
ChunkPosSet m_pending_chunks;
|
||||
void collect_path_points();
|
||||
void precompute_chunk_coverage();
|
||||
};
|
||||
} // namespace Cubed
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "Cubed/gameplay/chunk_pos.hpp"
|
||||
#include "Cubed/gameplay/path.hpp"
|
||||
#include "Cubed/tools/cubed_random.hpp"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <tbb/concurrent_hash_map.h>
|
||||
@@ -25,7 +24,6 @@ public:
|
||||
|
||||
private:
|
||||
std::atomic<unsigned> m_world_seed{0};
|
||||
Random m_random;
|
||||
std::atomic<float> m_probability{0.01f};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user