Skip to content

feat(cursor): extrude the cursor along the screen normal - #686

Closed
EtienneLescot wants to merge 4 commits into
mainfrom
feat/3d-cursor-volume
Closed

EtienneLescot wants to merge 4 commits into
mainfrom
feat/3d-cursor-volume

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

3D cursor: the cursor gains volume and presses into the tilted screen. Off by default.

Chantier 3D, PR 3. Spec complète et branche d intégration : #682.

🤖 Generated with Claude Code

Give the cursor a thickness, off by default (cursor.volume 0..1).

- Shader mode 13 (HLSL, MSL, WGSL) extrudes the sprite by repetition:
  mb.xy carries the extrusion vector, mb.z the tap count. Taps <= 1
  keep the flat branch, so volume 0 renders byte-identically to main.
- The extrusion vector is the plane normal rotated by the zoom
  rotation, projected and scaled by the thickness; on a flat screen it
  fades to a 3 px bottom-right offset (for a 34 px sprite).
- With volume on, a flat screen routes the cursor through mode 13 on an
  identity quad, which lands on mode 7's rectangle.
- A contact shadow (mode 12) sits under the tip, radius capped at
  0.8x the half-side so the inset quad never flips.
- CursorPlan carries the extrusion and the shadow; the sprite and shadow
  constant buffers are now built once in frame_geometry for all three
  backends.
- Setting plumbed through CursorVisualSettings, editor settings, style
  presets (old presets read as 0), SceneCursor, scene.rs (serde default
  0), LiveParams and the cursorVolume native param; "3D Depth" slider in
  the cursor pane, disabled with a tooltip while the cursor is hidden.
At the default size, iso extrudes ~37 px in 4K but the tap count was
capped at 16, so the side faces showed steps ~2.5 px apart. Raise the
cap to 48 in the Rust constant and in the HLSL, MSL and WGSL loop
bounds. The tap count still follows |e|, and taps <= 1 is unchanged.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

Remplacée par le curseur 3D modélisé (#695, intégré dans #682) : les réglages « 3D Depth » et « Float Height » ont laissé la place à un interrupteur « Curseur 3D ».

EtienneLescot added a commit that referenced this pull request Sep 17, 2026
Superseded later in this series by the modelled 3D cursor. Formerly #686.
EtienneLescot added a commit that referenced this pull request Sep 17, 2026
Superseded later in this series by the modelled 3D cursor. Formerly #686.
EtienneLescot added a commit that referenced this pull request Sep 17, 2026
Superseded later in this series by the modelled 3D cursor. Formerly #686.
EtienneLescot added a commit that referenced this pull request Sep 17, 2026
Superseded later in this series by the modelled 3D cursor. Formerly #686.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant