Improves cross-platform compatibility of Shaders written for StreamFX through the use of preprocessing to make things a bit more compatible. While we don't perform any proper parsing, this will be able to prevent basic issues.
Changes applied:
* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
Adds a new CMake option "ENABLE_PROFILING" which enables all CPU and GPU performance profiling available in StreamFX for tracking what's actually causing things to be slow.
This fixes the case where the effect vanishes, but we still hold an invalid pointer to a parameter of that effect. With the new code, the effect will not vanish as long as an effect pointer exists.
However, all effects must be created either through std::shared_ptr or std::make_shared. If they were not made through one of those means, the code will crash on the ->shared_from_this() call.
To further distance the code from having to do too much manually, the graphics context is now available as a managed class. All places that previously used obs_enter_graphics and obs_leave_graphics are now using the new gs::context class instead.
Box Blur is a prime candidate for Linear optimizations, and as such reducing the total necessary samples by about half. However due to the reduction in samples, only Area and Directional Blur are supported.
Related: #45, #6