Sharing a new version of paint experiment.
- Splash texture is processed and transformed into a two-dimensional array of alpha-channel values. Since I'm only going to use single-colored splashes, I removed coloring information from splash texture. Coloring is now done later when drawing on the texture.
- Added normal map to the shader. Normal map is only displayed where the paint is (see the screenshot below)
- Made a paint projectile that blows up and leaves splashes on collision
- Most settings are now handled by PaintProjectileManager singleton
- Texture size can now be manually assigned. I tried to find an automated solution to having similar splash size on any object, but could not find one
- Got rid of overlapping
Faced a performance issue: drawing time is significant and lowers the FPS for a moment, which irritates the eye. I suspect trying to run it on a mobile platform will make it even worse. What I'd like to do is significantly lower the splash map resolution and avoid using splash textures. Instead, I plan on blending the splash map with some randomized texture and then thresholding the result. Something like: