@spikebor_comic Sure. So first, I render all objects that need lines using a custom shader tag. So object's with shader pass tagged "LightMode"="Outline" are rendered to a new texture that holds information I've found I need to create nice lines.
@spikebor_comic That ends up looking the like the images below: RGB, R, G and B, the channels are different images so you can see each. Each channel is used for a different aspect of rendering. R stores a float referring to an object, this is used to draw inter-object lines (outlines).
@spikebor_comic G is used to distinguish inside lines, the zebra pattern in the previous G image show how I use grey where I don't want to draw a line. So after using an edge detection method of your preference on both R & G you're left with something like this, which is stored in a new texture.
@spikebor_comic This texture is then applied over the camera's color texture multiple times with a slight noise offset each time to give it that pencil-ish aesthetic, I also use the B channel here like an opacity so different areas are less or more harsh.
@spikebor_comic To get the wiggle effect, the noise offset which is used when applying outline texture is changed 6 times a seconds. And I move around the soft/harsh spots in the B channel on each object at the same rate.
@spikebor_comic Also here's the code for rendering shader passes to textures and blitting from one texture to another that I wrote for this. I don't recommend using these, but they might be nice to try and learn from. Passes: pastebin.com/LstBHRZF, Features: pastebin.com/rvju9psM
• • •
Missing some Tweet in this thread? You can try to
force a refresh