Extends
- Instruction
The filter pipeline is responsible for applying filters scene items!
KNOWN BUGS:
Global bounds calculation is incorrect if it is used when flip flopping filters. The maths can be found below eg: filters [noiseFilter, blurFilter] noiseFilter will calculate the global bounds incorrectly.
RenderGroups do not work with filters. This is because the renderGroup matrix is not currently taken into account.
Implementation notes:
Gotcha - nesting filters that require blending will not work correctly. This creates a chicken and egg problem the complexity and performance required to do this is not worth it i feel.. but lets see if others agree!
Filters are designed to be changed on the fly, this is means that changing filter information each frame will not trigger an instruction rebuild. If you are constantly turning a filter on and off.. its therefore better to set enabled to true or false on the filter. Or setting an empty array.
Need to look at perhaps aliasing when flip flopping filters. Really we should only need to antialias the FIRST Texture we render too. The rest can be non aliased. This might help performance. Currently we flip flop with an antialiased texture if antialiasing is enabled on the filter.