I bet you could make a bunch of interesting unity assets.
If you're interested in selling the source code, I'm willing to buy a few. I want to apply them on my game.
Just let me know!
Let's me explain a bit where I'm heading with all of this filter stuff
before I will roll some new ones.
In a couple of month, hopefully, I'm going to release some analog video
filters being part of the CRT TV simulator which will be a different release.
These analog video filters will be much more interesting than those little
gems I posted over here. With just a few parameters you will be able to get
some pretty cool video distortions, transitions, tearing, ghosting, folding,
etc. which can all be made dependent on the action of a game. At the end of
the day I'm going to port it all over to Unity, I guess. But for the time
being it's all C/C++ code. C/C++ will be the primary platform/implementation,
since I want to target many different platforms, i.e. I want to also target
some graphic tools like Photoshop, AfterEffects, etc. in building plugins to
make the filters available for artists and animators.
One of my goals within this regard is to make the video and CRT filters to
overlay a canvas in one of these tools such that an artist can draw his/her
graphics straight under the influence of said filters, in realtime. Hence, you
will set you parameters for the filters which will fit a certain aesthetic of
your game etc. and start drawing your stuff with the filters online. This is
quite interesting for doing retro graphics and other sort of graphics (say;
video/analog graphics). But it also serves another purpose I have in mind,
i.e. in controlling the video filters themselves -- as you draw. I hinted
about it while talking about the over-modulation characteristics and how it
can influence the video signal. So when you draw a picture with the filters
online you can immediately see how your colors may manipulate the filters
outcome/effect. For example, if you use lots of saturated colors in
combination, then this may lead to video distortions if a specific limiter
(de-saturator, or clamping -> producing higher harmonics) in a given filter
isn't active. The interesting aspect is that you can see it straight on the
screen while you draw. Speaking from another perspective; you can actually
design video distortions by drawing pictures (or sequences thereof) which may
have nothing to do with your actual game graphics but can if you so choose.
This will actually give an artist control over some video filter aspects
without needing to know any technical knowledge. Those pictures can later be
saved as a parameter-set to be imported into the game. When the video filters
get presented with such pictures (given the same filter parameters during the
design stage), it will exactly reproduce the distortion in your game the way
you designed them on the drawing board. Cool, no?
I want to use it for my own games. But there is some more work to be done
here. Am still in the design phase so to speak. Another problem I'm confronted
with is performance. Many of the video filters will put your system under a
heavy load. Therefor, I'm looking for ways to cut down on this load. Signal
resolution and the resolution of the discrete/analog components and their
digital approximations etc. need to be addressed right from the get-go. Hence,
currently I do experiment with some image-based algorithms to see if I can cut
down on the load of some of the stages to either replace or mix them together.
Within this regard I'm going to implement and experiment with another
new distortion algorithm I have in my mind up next which will allow me to
shear an image along multiple arbitrary-oriented lines. I want to see if I can
lessen the burden on the deflection beam of a TV (to a given degree) to draw
the image using parts of such an algorithm, not saying this algorithm won't be
quite computation expensive as well. However, I'm pretty sure that this
algorithm will likewise be very useful in its own right, for some more cool
screen transitions to come.
Anyhow. Regarding the source code and stuff you asked for; you can get these
effects for a good beer!
I just need to get the hang of Unity somehow.
Yeah, would be cool rip one or two algorithms out and port them over to Unity.
Problem is, I currently don't have the time to learn all of Unity's caveats
and read their docs etc.. But if someone may point me to a good clean shader
setup procedure with the least overhead and stuff, I may give it a try. But
don't quote me on this! xD