Commit Graph
5 Commits
Author SHA1 Message Date
Cursor Agentand西风逍遥游 bc128ffdf3 feat(graphics): use authored 2x2 grass and leaf sway atlases
Load the four grass and two leaf masks from test/Texture instead of
painting a procedural strip. Pack them into one 2x2-per-variant atlas,
sample frames by instance id, and tint with the existing two-tone green.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-15 07:36:32 +00:00
Cursor Agentand西风逍遥游 e8e11ef2f9 fix(test): make grass sway-frame advance check wrap-safe
0.48s at 0.12s/frame is exactly 4 frames and can land on the same atlas
index after modulo. Use 0.36s (3 frames) so the CHECK is stable.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-15 06:43:13 +00:00
Cursor Agentand西风逍遥游 23e83a4dcb fix(test): avoid unique_ptr in grass GPU REQUIRE checks
zeroerr Expression copies the compared value, which is illegal for
std::unique_ptr. Compare raw pointers instead.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-15 06:37:04 +00:00
Cursor Agentand西风逍遥游 27f7b176cb test(graphics): GPU-render t3ssel8r grass and save a screenshot
Bake alwaysDark into billboard normals so dense and sparse tufts can share
one mesh shader in the 3D pass, then add a windowed GPU test that draws a
field with a shadow-casting occluder and writes grass_field.png.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-15 06:30:51 +00:00
Cursor Agentand西风逍遥游 f29752dbb1 feat(graphics): add t3ssel8r-style stylized grass
Sample terrain meshes with Poisson-disk or Halton blue noise, expand
root-pivoted billboard quads, and shade them with a 4-frame sway atlas.
Instance ids desync the animation, the CSM shadow map picks between
light and dark green, and a second sparse pass adds always-dark tufts.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-15 06:15:15 +00:00