mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
feat(render): add shadow pass for entity models
This commit is contained in:
@@ -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
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user