Skip to content
This repository was archived by the owner on Aug 31, 2025. It is now read-only.
This repository was archived by the owner on Aug 31, 2025. It is now read-only.

Output flips vertically every frame when using buffer and video loaders #13

@o-dawgie

Description

@o-dawgie

I'm trying to apply a shader that uses a buffer to my webcam in real time, but I'm having quite a few issues getting it to work. When I run the command:

./shady -i /hdd/Downloads/shaders/video-feedback-flow/image.glsl -ofmt rgb24 -g 640x480 -f 60 | ffplay -f rawvideo -pixel_format rgb24 -video_size 640x480 -framerate 60 -

everything works almost as expected, but at some point along the line, the image gets flipped vertically every frame, which makes the output pretty much unusable. I tried using a video file as input instead of my webcam just in case it was a problem with that, but I got the same result. I also tested outputting to a file with

./shady -i /hdd/Downloads/shaders/video-feedback-flow/image.glsl -ofmt rgb24 -g 640x480 -f 60 -n 300 -o /hdd/Downloads/shaders/video-feedback-flow/test.bin

and playing it back with ffplay, but this had the same result. Finally I tried rendering to an mp4 with

./shady -i /hdd/Downloads/shaders/video-feedback-flow/image.glsl -ofmt rgb24 -g 640x480 -f 60 | ffmpeg -f rawvideo -pixel_format rgb24 -video_size 640x480 -framerate 60 -t 5 -i - /hdd/Downloads/shaders/video-feedback-flow/test2.mp4

but nothing changed that time either. As far as I can tell, this only seems to happen when a shader is using both the video loader and the buffer loader, and each one works fine when used without the other. I'm not particularly knowledgeable about this type of stuff so there's a decent chance I just made a mistake somewhere, but I couldn't figure it out so hopefully someone else will be able to track down the problem.

If it would be helpful, I could attach the files for the shaders I used and/or an example recording of the problem, but to keep this short I'm leaving them off for now. Let me know if you need more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions