Vhonowslend / StreamFX-Public

StreamFX is a plugin for OBS® Studio which adds many new effects, filters, sources, transitions and encoders! Be it 3D Transform, Blur, complex Masking, or even custom shaders, you'll find it all here.
https://streamfx.vhonowslend.com
GNU General Public License v2.0
3.94k stars 3.03k forks source link

Denoise filter causes zooming/transparency issues to applied sources #642

Closed HunterAP23 closed 3 years ago

HunterAP23 commented 3 years ago

Operating System

Windows 10 1903 and higher

OBS Studio Version?

27.1

StreamFX Version

0.11.0a4

OBS Studio Log

https://github.com/Xaymar/obs-StreamFX/files/7276370/2021-10-04.03-02-13.txt

OBS Studio Crash Log

No response

Current Behavior

When using the new Denoise filter, there are a few issues encountered in OBS, such as:

  1. Display Capture, Window Capture, and Game Capture sources are forcibly zoomed into the source's top-left corner. In most situations this simply changes the bounding box of the source to be smaller than the source, meaning that adjusting the transform of the source now makes it appear too big for the canvas.
  2. Video Capture sources are forcibly zoomed in, essentially cropping out the majority of the source. The bounding box issue from the above issue is still present here, but the source is also inexplicably zoomed into the top left corner of the source. 3. Browser sources lose any transparency they may have. This only applies to browser sources specifically. They do not suffer from any issues mentioned in either of the above issues.

Expected Behavior

Denoising filter should not affect the zoom level, transparency, nor bounding boxes for sources.

Steps to Reproduce the Bug

  1. Add any source to OBS.
  2. Apply the Denoise filter to the source.
  3. The issues immediately arise after the Denoise filter has been added.

Any additional Information we need to know?

Using an EVGA RTX 3090 with driver version 271.68 Tested using both Nvidia Video Effects SDK version 0.6.0 and 0.6.5 (latest).

The log shows a repeating message when using the Denoise filter: [StreamFX] <nvidia::vfx::denoising::denoising> Failed to initialize effect due to error: Error while loading the TRT model but I am not sure if this is related to this specific issue.

Xaymar commented 3 years ago
  1. (and 2.) sound like issues with async sources. I was fairly sure I copied the correct code over, but it seems I've missed some things and the size of the filter is stuck when applied to those.
  2. Applying denoising on transparency removes transparency, which is expected. At the moment you're seeing the exact output from the denoising network, with no post-processing to restore alpha from the input. Still technically a bug.
Xaymar commented 3 years ago

@HunterAP23 Do you mind submitting the transparency problem as a separate issue, instead of merging it into this issue?

HunterAP23 commented 3 years ago

Yep, will do Done in #646