hhirtz / mpv-retro-shaders

mpv ports of some libretro shaders for use with native-resolution encodes of Tool Assisted Speedruns
Other
34 stars 2 forks source link

Shaders Distort in Fullscreen #2

Open marekceglowski opened 2 weeks ago

marekceglowski commented 2 weeks ago

Hi there, thank you for converting these shaders. I like to use them to watch old anime/TV with a CRT look.

They work great in windowed mode, but the shaders distort and are barely visible when I make mpv fullscreen either by using the --fs=yes flag or by opening in windowed mode first and then double-clicking to fullscreen it.

So far, what I've been doing is to run:

ffplay -f lavfi -i color=c=black:s=${screenWidth}x${screenHeight}:d=10 -vf "scale=${screenWidth}:${screenHeight}" -an

to create a black background that covers any blank space and then run:

mpv --no-border --ontop --profile=crt-lottes video.mp4

to play the file on top of that. But this requires me to adjust my screen resolution to be close to what the video file size is. I tried using your suggested --vf=format flag with the screen height and the matching aspect ratio's width, but it was still not quite right.

Do you have any suggestions on how I can make the shaders function normally when in fullscreen mode? Thank you.

hhirtz commented 2 weeks ago

What shader are you using? What do you mean by distort/barely visible? lottes has a SHAPE parameter that you can tweak until you don't get banding artifacts. It depends on the size of the video and the size of your screen. crt-royale generally doesn't have this issue.

marekceglowski commented 2 weeks ago

I am using lottes. I'll try tweaking the shape parameter to fix the banding artifacts.

When I tried the --vf-format scaling in the readme, the "horizontal lines" from SHADOW_MASK=2 got much "thinner", so I'm also trying to see if there's a way to keep them as-is.

The video dimensions are 1518x1078 and my screen dimensions are 3840x2160, though I reduced it to 1920x1080 for the method described in my edit above.

hhirtz commented 1 week ago

Didn't see the edit. Yeah with crt-lottes scanlines will get smaller the higher the video resolution is. If you want more visible scanlines you need a smaller video or a larger screen. I don't know the best settings for anime but for retro games usually the screen must be 4-8 times larger than the video in order to have a decent look.