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

Multiple shader passes #75

Open
moritzsalla opened this issue Oct 27, 2021 · 0 comments
Open

Multiple shader passes #75

moritzsalla opened this issue Oct 27, 2021 · 0 comments

Comments

@moritzsalla
Copy link

moritzsalla commented Oct 27, 2021

Bit of a webgl noob here, please excuse if the answer is obvious.

How would I go about creating multiple shader passes? I cannot find any documentation on this, other the native buffer access added in 0.1.1 (which to my understanding gives access to the previous pass).

Can this be achieved by creating multiple sandbox instances and passing them to each other as a texture similar to this?

const pass1 = new GlslCanvas(canvas);
const pass2 = new GlslCanvas(canvas);

const pass1 = sandbox.load(myFrag);
const pass2 = sandbox.load(myFrag2);

pass2.setUniform("u_texture”, pass1);
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

1 participant