Following a project allows you to receive updates via email. It also lets the owner know that you like them.×
A paint app for my iPad where I can micromanage the UX
I have had some time to work on the paint app recently, but iOS platform differences are driving me crazy...somehow on the iPad there are visual glitches that don't show up on desktop at all. It's really hard to troubleshoot, so instead I just come up with hunches and spend a bunch of time implementing them. But so far those have just changed the nature of the glitches and not completely fixed them. For a while I thought maybe iOS only allows power-of-two RenderTextures, or has other RenderTexture size limits (even though I can't find documentation saying that). But now I'm using a totally tile-based system where the canvas is split up into a bunch of power-of-two tiles, and somehow there are still visual glitches on iPad when you draw at x >= 2048, even though there's no technical difference between those tiles and the ones before them. It's really baffling!
I've also been trying to figure out what other paint apps are doing to improve stroke appearance. I think there are a lot of little tricks going on, especially when you zoom in really close. A stroke is actually made up of tons of little texture stamps that are interpolated along the path of your stylus events, so there needs to be smoothing, spacing, blending, etc. Apple sends you estimated/predicted stylus events and then updates them later, so you need to draw the stroke and then update it when new data comes in (that has to be done for stroke smoothing/stabilization too). It switches between bilinear and point filtering depending on the DPI, so you can zoom out and have things look smooth, but zoom in and see individual pixels.
Possibly there's a separate antialiasing step that needs to be done on the stroke to reduce the visibility of the individual brush textures too, but I'm not sure...I think at least there's some blending other than what's possible with Unity's blend modes. There's a lot going on for just a simple brush stroke!
Here's a screenshot of the latest in a long line of iPad glitches. Circles to the left of the red 2048px line are all identical, circles to the right sometimes get scaled incorrectly.