Aleksoid1978 / VideoRenderer

Внешний видео-рендерер
GNU General Public License v3.0
1.04k stars 116 forks source link

Pre-size pixel shaders #13

Closed adipose closed 4 years ago

adipose commented 4 years ago

mpc-hc supports pre and post-size shaders. madVR supports both, but mpc-vr only supports post resize shaders.

This leads to a result that in mpc-hc, mpc-vr only honors one kind of shader, which is confusing as both are possible to choose and add.

Is there any chance for support in the future?

Aleksoid1978 commented 4 years ago

There is always a chance :)

v0lt commented 4 years ago

Write, why is this really necessary in your practice?

adipose commented 4 years ago

@clsid2 for comment

I suspect some shaders perform better on the source data than resized data. Resizing can cause artifacts which might decrease the quality of the shader output. But I wasn't involved in the decision to have both.

clsid2 commented 4 years ago

Another reason was performance. Having to process a smaller amount of pixels in the shader.

v0lt commented 4 years ago
  1. If we make custom shaders before resizing, then users will not be able to change the frame size using the DXVA2 and D3D11 video processors. A shader resize will be used, this will increase the load on the video card.
  2. I do not see an urgent need to use custom shaders before resizing.

Therefore, I do not plan to do this. This will complicate the code and take time for more useful things.

adipose commented 4 years ago

I was reviewing shaders in mpc-hc and mpc-be, and 16-235 to 0-255 [SD].hlsl has an interesting comment in the mpc-be source:

// Run this shader before scaling.

This comment is not in the mpc-hc source (maybe it was removed), but it is interesting. With MPC-VR we cannot follow the instructions of this shader.

adipose commented 4 years ago

I'm going to close this issue since there is no interest in supporting it. For now we will push all pre-resize shaders to post-resize in mpc-hc, and make a note for users of mpc-vr.

butterw commented 3 years ago

Could the mpc-vr support for pre-resize shader issue be reconsidered ?

From testing on my intel igpu, D3D9 EX with DXVA2 VP is used by default for resizing with MPC-VR rather than shader resizers. However performance on my old cpu/igpu is still very decent at 1080p on pre-resized shader capable EVR-CP and from what I see in the shader profiler display in mpv, the impact of user shaders is typically much larger than a resizer like bicubic.