Consolidate multiple phase generation calls into a single gen_chunk() method on Chunk, which handles neighbor generation and ensures thread safety. Simplify World::gen_chunks_internal by using gen_chunk() instead of manual phase orchestration.
* feat(shaders): add lighting to block accumulation OIT shaders
* feat(renderer): add water rendering with OIT and new shaders
* feat(water): implement screen-space reflection and refraction for water with depth fade and perturbation
* refactor(shader): replace glUniform calls with generic set_loc and remove cached locations
* feat(water): add noise-based caustics and configurable fog density
* fix(water shader): update depth fade and remove underwater check
- Increase DEPTH_FADE_DISTANCE from 8 to 10
- Remove conditional so depth fade always applies
- Darken deepColor from (0, 0.08, 0.15) to (0, 0.015, 0.045)
* feat(underwater): add volume scattering and shadow mapping for light shafts
* feat(rendering): add basic diffuse and ambient lighting to block rendering
* feat(world): add day/night cycle with server tick system
* feat(renderer): make ambient strength adjustable via dev panel
* fix(game_time): use unsigned tick type and enforce positive tick speed
* 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.
* perf(shadow): increase depth map resolution and refine PCF sampling
* feat(dev-panel): add tick freeze toggle and fix TickType sign
Add checkbox to freeze tick advancement in dev panel.
Change TickType from unsigned long long to signed long long to prevent underflow.
* chore(world): add missing <numbers> include
* feat(renderer): add runtime shader and shadow mode controls
Introduce user-controllable shader on/off, shadow mode (rotated Poisson disk, 3x3 grid, or off), light cull face, and discard transparent in depth pass. Expose all settings in new dev panel "shader" tab. Move ambient strength slider to the new tab.
* fix(texture): set texture wrap mode to clamp to edge
* feat(renderer): smooth shadow sun direction transitions using quantized directions and slerp
* feat(renderer): add PCSS shadow mode with configurable samples and softness
Implement Percentage Closer Soft Shadows (PCSS) as shadow mode 3.
Add a FindBlocker function and three Poisson disk arrays (8, 16, 32 samples).
Expose new uniforms (lightSizeUV, minRadius, maxRadius, samples) and provide
slider/combo controls in the dev panel for sample count, light size, and penumbra radius limits.
* feat(renderer): add roughness-based specular lighting to blocks
* feat(renderer): compute ambient and sunlight colors based on sun height
* feat(renderer): add moonlight and smooth day/night light blending
* refactor(renderer): extract day/night calculation and add billboard shaders
Add a new ParallelLight struct to encapsulate lighting parameters.
Move day-night cycle computation from render_world() to a new
day_night_calculation() method. Update sky shaders to use procedural
colors based on sun position. Add separate billboard shaders for sun/moon.
* feat(sky): add animated clouds to sky shader with speed control
* feat(renderer): add configurable cloud thresholds and white mix
* refactor: use TBB for concurrent hash maps and parallelize chunk processing
* fix: tbb link fail
* refactor(chunk): remove biome check for caves in rivers and oceans
* refactor(random): replace std distributions with custom implementations
Avoid overhead and platform-dependent behavior of `<random>` distributions by using direct engine operations and integer arithmetic. This ensures deterministic, cross-platform results and improves performance.
* refactor(generation): use chunk seed for cave and river paths
- Use per-chunk seed instead of global path_id for cave and river generation.
- Remove unused m_sum variables and m_path_id members.
- Clamp river yaw within 10 degrees of initial direction.
- Fix river radius interpolation (use t instead of 1-t).
- Lower sea level from 64 to 63.
* feat(gameplay): add Ocean biome with water generation and heightmap adjustments
- Introduce Ocean biome enum, builder, and detection logic.
- Add ocean water building to all existing biomes and modify heightmap thresholds for low mountainous areas.
- Skip cave and river generation in Ocean (and River) biomes; avoid carving water blocks.
- Comment out border blending call and update block fill logic.
* fix(gameplay): re-enable border blending and protect water in cave gen
* refactor(generation): move ocean water build to later phase
* feat(block): add is_transitional property and refine border blending
* fix(block): set stone block as transitional
* fix(world): generate temporary chunks for surface blend neighbor data
* fix(gameplay): simplify block fill logic in blend_surface_blocks_borders
* refactor(tree): remove debug logging and unused include
* refactor(renderer): centralize VAO setup and rename init_underwater
* refactor(gameplay): replace VBO with VAO for vertex data
* fix(renderer): move depth test enable to world rendering
The `glEnable(GL_DEPTH_TEST)` call was incorrectly placed in the general `render()` function, affecting UI and text rendering. Moved it to the start of the world rendering loop to ensure depth testing is only active during 3D world pass.
* 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
* feat: add grass texture and update grass_block texture
* feat: add block data
* feat: add blocks_tool
* feat: add sync info and change function in blocks_tools
* feat: add check and new function
* refactor: make block texture loading data-driven
* feat: add rendering for grass
* feat: passable grass
* feat: random grass place
* fix: memory leak in TextureManager::load_cross_plane_texture