The source allows you to apply effects to the same source without requiring a new instance of the source. Any changes done to the original source also apply to the mirror, so there is less total work that needs to be done.
It can also rescale the source, allowing you to use the same source as a cheap instant backdrop with Blur for example. What you do in the end is completely unwritten and up to you to decide.
An earlier commit changed how Blur filter rendered and thus m_technique was no longer being initialized, resulting in the check randomly failing if the memory was just right.
This also adds some more extra logging to the instance creation in case things fail and fixed one MSVC warning.
Fixes#1
- Fixed Gaussian Blur having color issues with radii that aren't a power of 2.
- Improved error reporting to better debug problems where Blur doesn't render.
- Switched from manual object management to managed classes.
- Lots of code cleanup for maintainability.
The graphics subsystem in OBS is freeing memory it didn't allocate, resulting in stack/heap corruption and other kinds of messy situations. The official "fix" for this is to use bmalloc, but then you lose any kind of ability to re-use the same buffer for multiple vertex buffers or update on the fly without adjusting code that is possibly outside of your control (such as in libraries).
This works around the issues by "patching" the gs_vertexbuffer object to no longer hold a reference to the gs_vb_data object. Currently only D3D11 is supported for this kind of hack and it might break in a future obs-studio release.
PR fixing this Issue: https://github.com/jp9000/obs-studio/pull/993
End goal of this is to be an anisotropic filtering purely on the GPU without any actual mipmaps in the graphics subsystem. The basic idea behind it is that we can create all possible mipmaps in a twice as big texture as the original and then can efficiently render it no matter the GPU features as it will only consume one sampler.
The texture that it outputs will have both horizontal, vertical and full mipmaps in it. Horizontal mipmaps reduce Width, Vertical mipmaps reduce Height and full mipmaps reduce both. This means that LoD levels are both possible in the X and Y direction, allowing for much greater precision mipmapping on all GPUs.
This is a temporary solution until we can directly copy updated textures to a mipmap level.
This option allows applying the blur to other color formats such as YUV. Bilateral Blur benefits the most from this, resulting in smoother images at lower kernel sizes.
* Added a 'Bilateral' de-noising blur, currently very resource hungry. It also has two extra sliders called 'Smoothing' and 'Sharpness', the former controls how smooth the output is
* Updated effect loading to be global instead of per instance.
* Changed default blur size to 5px.
* Simplified render loop (see previous effect commit).
This is not very optimized at the moment and will take quite a bit of GPU time. Will have to spend some time later to optimize it and perhaps add directional blur ("Motion Blur" to it).
* Fixed the perspective mesh not filling the entire frame with the default settings.
* Changed the maximum range of 'Field of View' to 179 degrees instead of 180 degrees.
* Changed the direction the perspective camera looks at to +Z instead of -Z. This should feel more natural for users of other 3D programs.
* Changed the 'Position (Z)' default to 0.
* Added translation strings for 'Field Of View', 'Position', 'Scale' and 'Rotation'.
FOV for the perspective camera was previously set to 180° (or more) resulting in really small images. Also added proper rotation support with options to choose which axis to rotate first.