mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-22 02:27:01 +08:00
feat: water rendering (#13)
* refactor: update water texture * feat(gameplay): implement transparent block rendering with depth sorting * fix(world): use camera pos for distance calculations, make water passable * refactor(player): use ivec3 for block pass check * feat(camera): add underwater detection * feat(renderer): add underwater effect with framebuffer post-processing * feat(block): add gas property and refactor solid block check * fix(assets): set leaf block transparency to false * fix(block): set leaf as transparent
This commit is contained in:
@@ -16,6 +16,7 @@ private:
|
||||
Player* m_player;
|
||||
float m_last_mouse_x, m_last_mouse_y;
|
||||
glm::vec3 m_camera_pos;
|
||||
bool m_under_water = false;
|
||||
|
||||
public:
|
||||
Camera();
|
||||
@@ -29,6 +30,8 @@ public:
|
||||
|
||||
const glm::mat4 get_camera_lookat() const;
|
||||
const glm::vec3& get_camera_pos() const;
|
||||
|
||||
bool is_under_water() const;
|
||||
};
|
||||
|
||||
} // namespace Cubed
|
||||
|
||||
Reference in New Issue
Block a user