Implements filters
Fixes #294 by implementing filter() and supporting cast.
- [x] Implement
/dm_filtertype - [x] Implement basic shader processing in
UpdateAppearance() - [x] Get basic debug shader working (greyscale)
- [x] Finish the DreamFilter set parameter code
- [x] Make DreamViewOverlay use RenderInRenderTarget
- [x] Sort out garbage collection for shader instances
- [x] Implement multiple shader support
Working shaders:
- [x] outline
- [x] greyscale (this one isn't actually in DM, it was just a debug thing, but I could see it being used)
- [x] Gaussian blur
Things this PR does
- Fairly heavily modifies the current rendering system to a "ping-pong" rendering system, which allows for repeated applications of shaders where needed.
- Adds the
filter()built-in proc, which returns a DreamObject of type/dm_filter - Adds handling for the
.filtersvar on atoms, with appropriate appearance update and listifying behaviour (as per BYOND) - Adds the DreamFilterMetaObject which adds appropriate appearance update behaviour to
/dm_filterobjects - Adds the DreamFilter type, which is basically just a meta-data object that can be passed over the network in IconAppearance and holds the necessary data to instantiate the requested shader on the client
- Adds some shader caching & garbage collection behaviour to ClientAppearanceSystem so we can keep a handle on shaders which share parameters, and clean up shader instances which aren't in use anymore.
- Adds a "Filter Demo" button to the TestGame so you can pick from a list of filters with default settings and see that it works.
##Examples
BYOND left, OD right
Blur:

Outline:

This PR is ridiculous and I am so happy someone else handled this nonsense for us, thanks a bunch
~~TODO: change this to /dm_filter, the ENTIRELY UNDOCUMENTED type path of filters in DM~~
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.