Here is how to make the Ink Gun from Splatoon in Godot 4.
Scripts:
UVPosition: https://pastebin.com/M6SyyCud
SetupMesh: https://pastebin.com/SZYzgfju
Brush: https://pastebin.com/YJns6a2T
DrawViewport: https://pastebin.com/AQm9adaq
PaintParticle: https://pastebin.com/UY9MUy2D
PaintEmitter: https://pastebin.com/gfQKmNqM
ScoreCalculator: https://pastebin.com/evYL6kGh
Resources:
https://alfredbaudisch.com/blog/gamedev/godot-engine/godot-engine-in-game-splat-map-texture-painting-dirt-removal-effect/
https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html
Watergun model: https://sketchfab.com/3d-models/low-gun-4adbcb44118944e3aa553012aed16acd
Chapters:
0:00 Intro
0:43 Model & Unwrap
2:20 Collision to UV Coordinate
6:17 Draw Ink to texture
9:13 Making Paint
13:32 Ink Shader
16:26 Score Calculation
19:56 Final result!