Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

first pass at occlusion in gpurenderer#31207

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
cabanier wants to merge1 commit intomrdoob:dev
base:dev
Choose a base branch
Loading
fromcabanier:occlusion

Conversation

cabanier
Copy link
Contributor

This implements per pixel occlusion by updating the shader of each renderer object.

@sunag , even though I apply the masknode to each element in the scene, it seems to apply only to some of the elements in the scene. If I recreate the material with masknode (instead of just assigning the node), it seems to work.

Am I doing something wrong?

@cabanier
Copy link
ContributorAuthor

@mrdoob instead of copying the depth like we did previously, we now depth text for each render pixel.
I'm hoping to use the view/projection matrices in effect of the capture of the depth texture for better occlusion alignment. I have not figured out how to do that yet :-)

@github-actionsGitHub Actions
Copy link

github-actionsbot commentedMay 30, 2025
edited
Loading

📦 Bundle size

Full ESM build, minified and gzipped.

BeforeAfterDiff
WebGL337.4
78.67
337.4
78.67
+0 B
+0 B
WebGPU553.64
153.44
555.1
153.85
+1.46 kB
+411 B
WebGPU Nodes552.99
153.28
554.45
153.69
+1.46 kB
+411 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

BeforeAfterDiff
WebGL468.59
113.32
468.59
113.32
+0 B
+0 B
WebGPU628.59
170.16
630.03
170.55
+1.44 kB
+396 B
WebGPU Nodes583.45
159.5
584.88
159.9
+1.44 kB
+397 B

@cabanier
Copy link
ContributorAuthor

@sunag@Mugen87 Any idea why applying the masknode to each material only works for some objects?

@sunag
Copy link
Collaborator

I'm working on aNodeHandler to handle this with this kind of replacement, I thinkrenderer.applyOcclusion() should be replaced with something more targeted at replacement at render time.

@cabanier
Copy link
ContributorAuthor

I'm working on aNodeHandler to handle this with this kind of replacement, I thinkrenderer.applyOcclusion() should be replaced with something more targeted at replacement at render time.

How can I do that?

@sunag
Copy link
Collaborator

How can I do that?

I'm developing this new feature.

Have you tried replacing for testes your coderenderer.xr.applyOcclusion() with?

scene.traverse((object)=>{if(object.material){object.material.maskNode=false;}});

It seems to disappear(apply) all objects.

@cabanier
Copy link
ContributorAuthor

Have you tried replacing for testes your coderenderer.xr.applyOcclusion() with?

scene.traverse((object)=>{if(object.material){object.material.maskNode=false;}});

It seems to disappear(apply) all objects.

Isn't that expected? Or are you saying that the current code disappears all objects?

@sunag
Copy link
Collaborator

Isn't that expected? Or are you saying that the current code disappears all objects?

Yes, works as expected, just answering the previous question about: masknode only works for some objects. The problem is probably related to something else.

@cabanier
Copy link
ContributorAuthor

Isn't that expected? Or are you saying that the current code disappears all objects?

Yes, works as expected, just answering the previous question about: masknode only works for some objects. The problem is probably related to something else.

was this problem fixed or do I need to open an issue?

@sunag
Copy link
Collaborator

this doesn't seem to be a problem with the maskNode input as tests have shown, but if it is we can fix it.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@cabanier@sunag

[8]ページ先頭

©2009-2025 Movatter.jp