Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A shadertoy definition for iChannel0..3 #496

Closed
2 tasks
AnEthernetCable opened this issue Mar 25, 2021 · 3 comments
Closed
2 tasks

A shadertoy definition for iChannel0..3 #496

AnEthernetCable opened this issue Mar 25, 2021 · 3 comments

Comments

@AnEthernetCable
Copy link

AnEthernetCable commented Mar 25, 2021

Description

I am looking for an implementation for the iChannel parameter found on shadertoy. I do not believe it exists at the moment, or is not defined in the shadertoy-template.effect. I had a few pokes around to see if I could figure it out, but I have limited knowledge on how GLSL works.

I am specifically looking to implement this shader from shadertoy.

Checklist

  • I am willing to pay someone to implement this feature.
  • This feature absolutely can't be done with already existing features.
@Xaymar
Copy link
Owner

Xaymar commented Mar 25, 2021

iChannel# has no direct mapping in StreamFX, mainly due to the Custom Shaders being meant for simple effects. For more complex effects, I recommend learning, C, Rust, C++, Python, Lua or any other language that compiles to native code.

@skeletonbow
Copy link

Description

I am looking for an implementation for the iChannel parameter found on shadertoy. I do not believe it exists at the moment, or is not defined in the shadertoy-template.effect. I had a few pokes around to see if I could figure it out, but I have limited knowledge on how GLSL works.

I am specifically looking to implement this shader from shadertoy.

Checklist

The shader you have linked to on Shadertoy is reading a single texture and then processing it, which StreamFX can already do, you just have to read the documentation and study examples to see how the texture from OBS is passed into the shader, then convert the Shadertoy code to use the correct parameters in StreamFX.

As Xaymar mentioned, only a single texture can be used currently in StreamFX however, but the shader you linked to only uses one so it should be an easy one to make work in StreamFX.

It's possible to use multiple textures using the OBS Shaderfilter plugin as long as each of the other textures is from a file, so Shadertoy shaders that use static images as textures can be ported to Shaderfilter also - however the plugin ignores filenames provided in the code and requires manually configuring each texture file in the OBS UI to use them (just an annoying quirk of sorts).

Using multiple video inputs or multiple buffers etc. wont work in any of the OBS shader plugins currently and as Xaymar suggests requires writing a custom plugin or LUA/Python script or whatever.

Be sure to read all of the StreamFX documentation regarding shaders, as well as look through the example shaders included with the plugin for tips on how to sample the texture passed from OBS.

HTH

@AnEthernetCable
Copy link
Author

Ah, I understand. Thank you, I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants