I’m working with hand-drawn sprites. My artist has a nice pen-and-ink cross-hatching style in his concept drawings, which i’m looking to recreate in the game. I have two versions of each sprite - an outline drawing with no shading, and a fully shaded drawing with cross-hatching everywhere.The idea is to render shadows as if they were shaded in by the artist, rather than just making the main texture lighter or darker.
My goal is to find the final light level on the fragment, after all lights have been processed (float in range 0-1) and use that as the alpha for the shaded version of the texture, which would get alpha-blended on top of the unshaded (i.e. fully lit) version of the texture.
I have already made nicely dynamically pixel-lit, normal-mapped sprites, but I want to add a final pass that completely overwrites the previously calculated fragment with a new one which is the alpha-blend of the unshaded and shaded textures.
My questions are
-
Can I add a final pass to a surface shader that runs after all the forward light passes have finished. If so what would the pass tags and pragmas need to be?
-
Is it possible to read the current fragment color in a final pass of a shader? If so, how would I access this value from inside the pass? (From here i can do some color math to get the average tone from the color value)
Thanks for your help.
EDIT: This should probably be in the shaders sub, sorry about that