Request: Command line utility to compile shaders/effects or better error handling. #763
playaspec posted onGitHub
Explain the Feature/Enhancement
Writing/porting shaders is WILDLY painful. It's clunky to have to make a modification in an editor, switch to OBS, open the properties of the shader you're working on, reload, fail, help --> logs, or worse yet, CRASH losing all output. Try to reload OBS, straight to crash because of bad code. Close editor. Rename file. Launch editor. Launch OBS again. Dig up previous log, try and pick up where you left off. That is ONE iteration of the development process. Wash, rinse, repeat.
What makes this feature/enhancement useful for StreamFX and its users?
Source and filter shaders unlock the real creative potential of StreamFX/OBS, and puts it in the hands of users. The ability for users to create/adapt their own shaders reduces the developer's burden to create effects in C++. It's a shame it's such a low priority. There's a wealth of shaders written in other shading languages just begging to be ported, but the barriers to productivity in porting them is too high. A simple wrapper around the function that passes the shader file contents into the compiler and dumps the compiler output to the console would allow for a more traditional development workflow. Edit --> save --> build. If it fails, go back to edit and refactor. If it succeeds, go test it in OBS. This tool could then be easily integrated into the user's prefered IDE. A plethora of working shaders are bound to come rolling in.
At minimum better error handling to prevent crashing would be a step in the right direction.
Checklist
- I am offering a monetary bounty/reward for the implementation of this Feature/Enhancement.
- There is no other way to currently do this in StreamFX or OBS Studio.
Any additional Information we need to know?
If this development cycle can be improved, I intend to polish the existing shaders to work on Mac and Linux, plus submit many new ones.