refactor(render): unify model and player rendering with single shader pipeline

This commit is contained in:
2026-07-25 13:29:52 +08:00
parent 2e3b4f4f0f
commit 2568eb7d18
11 changed files with 67 additions and 117 deletions

View File

@@ -14,7 +14,7 @@ public:
Camera& camera);
void shadow_pass(const std::string& name, const glm::vec3& pos,
const glm::mat4& light_matrix, Camera& camera);
Camera& camera);
private:
Renderer& m_renderer;

View File

@@ -14,8 +14,7 @@ public:
~PlayerRenderer();
void init();
void render(const Shader& shader, ClientWorld& world);
void shadow_render(const Shader& shader, glm::mat4& light_matrix,
ClientWorld& world);
void shadow_render(const Shader& shader, ClientWorld& world);
private:
struct PlayerVertex {

View File

@@ -132,9 +132,8 @@ 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_entity(ClientWorld& world);
void render_normal_block(const glm::mat4& model_mat,
const glm::mat4& mv_mat, const glm::mat4& norm_mat,