Replace the 3D sphere brush with a square stamp in the surface tangent
plane whose shape and opacity come from a grayscale/alpha mask. Masks
are assignable via an inspector list with a live-switchable active index;
an empty list falls back to a procedurally generated circle mask that
reproduces the previous round brush.
- Mask drives opacity (luma * alpha * brushOpacity) via source-over blend
instead of a hard threshold cut; gray 0.5 = 50%.
- GPU and CPU paths stay identical; non-readable textures are supported on
the CPU via GPU blit-readback.
- Dilate pass treats any alpha > 0 as painted so soft edges survive seam
padding.
- Brush alignment enum (Camera/World) plus manual rotation; tangent frame
handedness fixed so stamps read upright and unmirrored in both modes.
Reduce comments to non-obvious "why" notes and convert UnityEngine.Object
null checks to implicit bool (if (obj) / if (!obj)). Input System devices
(Mouse.current, Keyboard.current) and plain arrays keep explicit != null.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce an extensible game mode system toggled with Tab:
- Player Control: WASD movement with always-on mouse camera orbit
- Paint: player frozen, left-click paints, right-click holds to orbit
Add GameMode base class, GameModeManager, and the two concrete modes.
Refactor controlled scripts to expose clean state flags instead of
handling input themselves: ThirdPersonOrbitInput.LookMode,
PlayerCharacterController.ControlEnabled, MeshPainter.PaintingEnabled.
Also fix camera zoom: remove the obsolete /120 wheel normalization so
one scroll notch maps to one zoomSpeed step under the new Input System.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Install Cinemachine 3.1.7 and set up an orbital third-person camera rig
(CinemachineBrain, OrbitalFollow, RotationComposer, Deoccluder).
- Add ThirdPersonOrbitInput: mouse-driven orbit and wheel zoom with a Tab
toggle that unlocks the cursor and pauses rotation.
- Fix MeshPainter so the paint ray skips the player's CharacterController
capsule (and any other collider) and always targets the mesh collider,
so painting works from every camera angle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Unity 6000.3 (URP) project with live mesh painting in play mode.
- MeshPainter.cs: paint a SkinnedMesh with the mouse, seamless across
UV islands via 3D-space painting, GPU and CPU backends (switchable),
edge-padding/dilation against bilinear seam bleed
- FrameRateLimiter.cs: simple frame rate limiting component
- MeshPaintBrush / MeshPaintDilate shaders for the GPU paint path
- Unity-specific .gitignore and .gitattributes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>