GPU-accelerated texture painting system for Unity with multi-channel PBR support, real-time fluid simulation, and a fully extensible command pipeline.📖 DOCUMENTATION | 🎮 WEBGL DEMOSimple Painter is a high-performance, GPU-driven runtime texture painting framework for Unity. It enables real-time painting directly onto 3D meshes with full PBR multi-channel support, covering Albedo, Normal, Metallic, Roughness, Height, and any custom shader property.The system is built around a phased command pipeline — all GPU work is batched into a single CommandBuffer per frame, ensuring minimal draw call overhead and zero per-frame GC allocations. The architecture is modular and extensible: triggers detect input, stroke methods interpolate brush paths, tools dispatch stamps, and committers finalize the result onto persistent texture layers.Painting Modes: Simple Painter supports both direct painting (instant commit on stroke end) and simulation-based painting with three tiers of real-time fluid dynamics — from lightweight gravity drips to full MLS-MPM particle fluid. Each simulation tier produces physically-driven effects including flow, absorption, evaporation, and viscous cohesion, all running entirely on the GPU.Channel & Layer System: Paint onto multiple material channels simultaneously. Each channel supports multiple layers with independent visibility, opacity, blend modes, and initial textures. Blend modes are type-aware — Color channels offer Screen, Overlay, and SoftLight; Normal channels offer RNM, UDN, Whiteout, and MaxSlope; Scalar channels provide standard arithmetic blends.Input Flexibility: Three built-in trigger types handle different input scenarios: screen-space raycasting (mouse/touch), physics collisions (tire tracks, scratches), and particle system impacts (splatter effects). Four stroke interpolation methods are included: Bezier curves for smooth freehand, Line for straight edges, Dot for stippling, and Anchored for stamp placement with drag-to-resize.Environment & Simulation: The PaintEnvironment system provides gravity-driven flow fields with optional WindZone integration, noise-based perturbation, and external brush forces (push, pull, swirl). Fluid simulations read from this shared flow context to produce realistic paint behavior on any surface orientation.Progress Tracking: A built-in progress tracker measures paint coverage on any channel as a 0-to-1 ratio using async GPU readback and Burst-compiled counting. Supports UV island masking and custom mask textures for precise measurement regions — ideal for puzzle or objective-based gameplay.Simple Painter is compatible with Built-In, URP, and HDRP render pipelines.GPU Command Pipeline — All rendering batched into a single CommandBuffer per frame with 5-phase execution ordering (Setup, Process, Draw, Commit, Composition). Object-pooled commands ensure zero GC allocations.Multi-Channel PBR Painting — Paint on Albedo, Normal, Metallic, Roughness, Height, or any custom shader property simultaneously. Per-channel masking (R/G/B/A) and sRGB-aware format selection.Multi-Layer Compositing — Each channel supports multiple layers with independent visibility, opacity, and type-specific blend modes (8 Color modes, 5 Scalar modes, 7 Normal modes).Three Fluid Simulation Tiers — FluidShallow (height-field gravity flow, lowest cost), FluidViscous (SPH cohesive droplets with sub-texel tracking), FluidParticle (full MLS-MPM in float32 precision).Four Stroke Interpolation Methods — Bezier (smooth curves), Line (straight edges), Dot (single stamps), Anchored (drag-to-scale/rotate). All support dynamic size, opacity, rotation, and jitter modulated by distance, speed, time, or randomness.Three Input Trigger Types — Raycast (mouse/touch/screen-center), Collision (physics contact), Particle (particle system impact). All decouple input from the painting pipeline.Flow Field Environment — Gravity projection, Unity WindZone integration, dual-layer noise perturbation, external force injection with configurable decay. Baked into a multiplexed GPU texture.UV Seam Stitching — Automatic cross-island seam linking and border dilation via mesh analysis, preventing visible seams on painted textures.Paint Progress Tracking — Async GPU readback with Burst-compiled pixel counting. Fill and Erase modes, configurable downsample steps, UV island or custom mask support. Global progress aggregation across multiple tracked objects.Extensible Architecture — Strategy pattern for stroke methods, tools, committers, and shader binders. Hot-swappable ScriptableObject configs at runtime. Composite pattern for the paint node hierarchy with broadcast-driven lifecycle.Render Pipeline Support — Compatible with Built-In Render Pipeline, Universal Render Pipeline (URP), and High Definition Render Pipeline (HDRP).Performance Optimized — Object-pooled GPU commands (CRTP pattern), stack-based CommandBuffer pooling, batch raycasting, instance-ID cached surface lookups, and pull-based tool polling with no event overhead.

