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

Example: Add webgpu_postprocessing_masking #29016

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jul 29, 2024

Related issue: Closes #29008

Description

I fork the example of @cmhhelgeson to create the simplified version.

We can have this effect with:

const base = pass( baseScene, camera );
const sceneMask1 = pass( maskScene1, camera ).a;
const sceneMask2 = pass( maskScene2, camera ).a;

let compose = base;
compose = sceneMask1.mix( compose, texture( texture1 ) );
compose = sceneMask2.mix( compose, texture( texture2 ) );

postProcessing.outputNode = compose;

@sunag sunag added this to the r168 milestone Jul 29, 2024
@sunag sunag marked this pull request as ready for review July 29, 2024 20:50
@sunag sunag merged commit 4c714de into mrdoob:dev Jul 29, 2024
11 checks passed
@sunag sunag deleted the dev-example branch July 29, 2024 20:50
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

Successfully merging this pull request may close these issues.

1 participant