feat(render): add shadow pass for entity models

This commit is contained in:
2026-07-25 11:57:00 +08:00
parent 5951a5e81c
commit 2e3b4f4f0f
6 changed files with 56 additions and 24 deletions

View File

@@ -13,10 +13,13 @@ public:
void render_model(const std::string& name, const glm::vec3& pos,
Camera& camera);
void shadow_pass(const std::string& name, const glm::vec3& pos,
const glm::mat4& light_matrix, Camera& camera);
private:
Renderer& m_renderer;
void render_node(const ModelNode& node, const glm::mat4& parent,
const glm::mat4& view, const Shader& shader);
void render_mesh(const Mesh& mesh);
const glm::mat4& view, const Shader& shader, bool shadow);
void render_mesh(const Mesh& mesh, bool shadow);
};
} // namespace Cubed

View File

@@ -82,10 +82,8 @@ public:
bool handle_event(const Event& e);
void render_model(const std::string& name, const glm::vec3& pos,
Camera& camera);
ModelManager& model_manager();
ModelRender& model_renderer();
private:
TextureManager& m_texture_manager;

View File

@@ -133,6 +133,7 @@ private:
void render_underwater(ClientWorld& world);
void render_outline(ClientWorld& world);
void render_entity(ClientWorld& world);
void shadow_entity(ClientWorld& world, const glm::mat4& light_matrix);
void render_player(ClientWorld& world);
void render_normal_block(const glm::mat4& model_mat,