Commit Graph

13 Commits

Author SHA1 Message Date
662f10047a feat(renderer): add shadow mapping with PCF soft shadows
Introduce shadow mapping using a dedicated depth framebuffer and shader. The block fragment shader now performs percentage-closer filtering (PCF) with Poisson disk sampling and random rotation for soft shadows. The vertex shader outputs light-space coordinates. A new depth shader pair handles rendering from the light's perspective, discarding transparent fragments. The renderer sets up the light projection based on the camera position and sun direction, and applies the shadow factor to diffuse lighting. Day/night cycle can now be toggled off in the world server thread.
2026-06-16 22:27:08 +08:00
zhenyan121
2906106597 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
2026-05-30 15:11:40 +08:00
611a795481 chore: add clang-format and pre-commit configuration 2026-04-28 09:22:55 +08:00
106cc3d398 feat: add Config class 2026-04-24 17:08:06 +08:00
c2321a0a6e refactor: warp everything in Cubed namespace 2026-04-20 22:18:02 +08:00
e2f0e7ea66 fix: camera cannot pan left or right 2026-03-21 13:07:28 +08:00
cf423c7db4 feat: add sky box 2026-03-14 17:05:35 +08:00
fd5314a1d1 feat: add block detection while walking 2026-03-14 16:32:41 +08:00
fc7f3e75b1 style: unify naming conventions across the project 2026-03-07 09:51:51 +08:00
d73d8e592d fix: camera position not correct 2026-03-06 23:01:04 +08:00
05a62e7443 feat: add camera and player class 2026-03-06 22:07:26 +08:00
02127c1e01 chore: remove dead code 2026-03-05 21:25:12 +08:00
9fe1eaec24 feat: initialize OpenGL 2026-03-05 17:01:01 +08:00