Commit Graph
18 Commits
Author SHA1 Message Date
sunxfancy 3592c05438 Merge remote-tracking branch 'origin/main' into feature/waterfall-shader
# Conflicts:
#	src/modules/graphics/Graphics.cpp
#	src/modules/graphics/Graphics.h
2026-08-16 12:56:54 +08:00
sunxfancy 30d2fb13bb feat(graphics): flowing waterfall shader
Add a Waterfall helper (graphics/Waterfall.{h,cpp}) built on the custom
Mesh3D shader path that renders a vertical sheet as falling water:

- Downward flow: scrolling fractal noise + elongated vertical streaks
  (streakScale) to convey falling velocity.
- White-water foam: turbulent crests in the body plus foam bands at the
  top lip (topFoam) and the bottom splash pool (bottomFoam).
- Sky reflection: Fresnel-weighted reflection of the environment cubemap
  plus a specular glint from the primary directional light.
- Bottom transparency fade so the sheet melts into the pool.

Push-constant params drive time, flow speed, turbulence, streak
count/scale, top/bottom foam, foam amount, water color, reflection
intensity and sun intensity. Exposed via Graphics::newWaterfall() and
the Squirrel binding (Waterfall class). Also adds Graphics::saveFramePng
to dump the presented frame to a PNG.

Includes a runnable demo (examples/waterfall-demo) and tests: params
round-trip plus a GPU render test proving the waterfall renders, changes
over time (flowing), and differs between calm and foamy configurations.
2026-08-15 23:33:53 +08:00
西风逍遥游 91940965cb Merge branch 'main' into codex/procgen-bush-generator 2026-08-15 22:02:19 +08:00
西风逍遥游 720cbf75f6 Merge pull request #68 from EVEngine/feature/procedural-textures-pbr
feat(procgen): expand procedural textures + PBR material generation
2026-08-15 22:01:40 +08:00
西风逍遥游 d1a3e07e8d Merge branch 'main' into codex/procgen-skyscraper 2026-08-15 22:01:11 +08:00
西风逍遥游 72252ad218 procgen: add procedural 3D small bush (mesh.bush)
Add a deterministic low-poly small-bush recipe to procgen. It clusters
squashed foliage ellipsoids under a dome silhouette, adds emergent woody
twigs and optional leaf cards, using a two-region atlas (bark/foliage)
consistent with mesh.tree.

- src/modules/procgen/algorithms/BushMesh.{h,cpp}: recipe implementation
- MarchingCubes.cpp: register mesh.bush in MeshRecipeRegistry
- test/procgen.cpp: reproducibility/styles, option validation, render dump
- examples/bush-generator/: interactive showcase + Kenney CC0 mini-forest
  derived atlas with attribution
- docs/dev/程序化生成模块设计.md: document mesh.bush

Verified: procgen suite 57/57 passing, render dump produces 900x700 PNG.
2026-08-15 20:54:30 +08:00
sunxfancy d253dc5ab1 feat(procgen): expand procedural textures + PBR material generation
Add 10 new albedo texture recipes (rock, wood, ripple, cloth, ornament,
spot, zebra, wall, cement, mud) alongside the existing soil/stone/marble/
water/sky_cloud, and introduce full metallic-roughness PBR generation.

A texture is now described by a single TextureRecipeDef (albedo ramp +
displacement field + PBR knobs), so both an albedo ImageData recipe
(tex.*) and a complete PBR set (pbr.*: albedo/normal/roughness/metallic/
height/ao) are derived from the same pixel-aligned height field, with
seamless tiling support.

Expose generatePbrMaterial + pbr recipe listing on the Procgen module and
script bindings. Add tests for expanded recipes, PBR reproducibility,
map ranges, and module/error paths.
2026-08-15 20:51:29 +08:00
西风逍遥游 69909204c9 test(procgen): cover linear structure mesh recipes
Assert registration, per-kind validity (indices/normals/finite positions),
reproducibility, uniform scaling, linear vertex growth with segments, and
seam alignment (unit spans exactly [0, segLength]) for all six recipes.
2026-08-15 17:58:19 +08:00
西风逍遥游 a36b5837de feat(procgen): add procedural 3D skyscraper generator
Add mesh.skyscraper recipe producing a deterministic setback-tiered tower
with a window grid and optional spire. Window quads are raised a thin lip
above each facade so openings read under directional lighting without
coplanar z-fighting.

- Register recipe in MeshRecipeRegistry
- Add topology/height/reproducibility unit tests
- Add render smoke test outputting out/skyscraper.png
- Add interactive example examples/skyscraper-generator/
- Update procgen and module design docs
2026-08-15 17:51:17 +08:00
西风逍遥游 5460b79412 Merge branch 'main' into codex/random-rock-generator 2026-08-15 14:22:35 +08:00
西风逍遥游 01223e1149 Merge branch 'main' into codex/hex-grid-planet 2026-08-15 13:19:27 +08:00
西风逍遥游 a1e7fffe99 feat(procgen): add hex-grid planet generator 2026-08-15 13:11:27 +08:00
西风逍遥游 3f3f01298d feat(procgen): add procedural tree generator 2026-08-15 12:41:06 +08:00
西风逍遥游 c0b2b125e5 feat(procgen): add random low-poly rock generator 2026-08-15 12:35:08 +08:00
西风逍遥游andCursor Agent 14fbf353af test(procgen): expand WFC / Marching Cubes coverage + scenarios (#47)
* test(procgen): expand WFC and Marching Cubes coverage

Add adjacency checks, error paths, MeshBuild accessors, raw density
cases, all field recipes, isolevel variation, and module API failures.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(procgen): add dungeon delve and crystal cave scenarios

Two cross-module simulations:
- WFC dungeon → TileLayer palette → A*/FlowField spawn→stairs
- Marching Cubes terrain island + crystal spheres with mesh budgets
  (optional GPU upload soft-skips without Vulkan surface)

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(procgen): expand WFC/MC unit coverage and three scenarios

Add dungeon adjacency/multi-seed WFC checks, MC resolution/torus/volume
stability cases, plus cave expedition (A*+FOV), overworld biome travel,
and loot prop bake scenarios. Branch synced with main.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-13 11:28:55 +08:00
西风逍遥游andCursor Agent 30c98b286f feat(procgen): add Wave Function Collapse and Marching Cubes (#33)
- wfc.simple: tiled WFC with dungeon/cave/terrain presets → Grid2D
- mesh.marchingcubes: Lorensen/Cline MC over sphere/torus/noise/terrain fields
- MeshBuild CPU mesh + Procgen buildMesh/generateMesh bindings
- Graphics::newMeshFromArrays for GPU upload
- tests, example keys 6–8, docs

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-11 20:41:43 +08:00
西风逍遥游 b9e3730072 feat(tests): enhance graphics tests with new rendering previews
- Added new test cases for various graphics functionalities, including animation previews, particle effects, and inventory UI.
- Implemented rendering previews for Mixamo animations, Box2D physics, and procedural generation, allowing for real-time visualization during tests.
- Introduced helper functions for drawing graphics elements, improving the clarity and maintainability of test code.
- Enhanced existing tests to utilize the new graphics capabilities, ensuring comprehensive coverage of rendering features.
2026-08-11 02:57:47 +08:00
西风逍遥游andCursor Agent 6f290b2a1d feat(procgen): 程序化生成模块 Phase A/B(地图 + 贴图) (#5)
* docs(procgen): add procedural generation module design

Capture confirmed product direction (runtime map-first, textures
second, pixel/low-poly RPG) plus API sketch, algorithm registry,
configurable outputs, and Phase A checklist.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* docs(procgen): list procgen in module summary table

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* feat(procgen): Phase A runtime map generation with DTL

Add eve.Procgen module: semantic Grid2D, algorithm registry, palettes,
and TileLayer/JSON outputs. Built-ins use Dungeon Template Library
(BSP, cellular cave, maze, perlin terrain) plus local drunkard walk.
Includes tests and examples/procgen demo.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* feat(procgen): Phase B runtime pixel texture recipes

Add seamless value-noise texture generation with banded color ramps
for soil/stone/marble/water/sky_cloud, ImageData/Texture/normal outputs,
and script bindings for gfx.newTexture / drawTexturedRect.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* fix(test): qualify eve::image::ImageData in procgen tests

Bare image:: failed to resolve under `using namespace eve::procgen`,
breaking unit_test builds on Linux/Windows/macOS CI.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* fix(procgen): link EVProcgen in tests and fix Apple Clang DTL build

unit_test was missing EVProcgen, causing undefined references on Linux/Windows.
Avoid the DTL umbrella header (broken Voronoi CRTP on Apple Clang) and provide
DrawJagged* compat shims that define the missing drawOperatorArray.
Verified locally: linux-debug build, unit_test link, and all 13 procgen ctests.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-09 08:47:27 +08:00