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

WebGPURenderer: Render Pass ID and Double Pass #26333

Merged
merged 4 commits into from
Jun 28, 2023
Merged

WebGPURenderer: Render Pass ID and Double Pass #26333

merged 4 commits into from
Jun 28, 2023

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jun 27, 2023

Description

RenderObjects pass id is useful to renderer the same object with internal modifications without needs to use material.needsUpdate and preserving the chain map.

Added support for forceSinglePass = false

https://raw.githack.com/sunag/three.js/dev-ns/examples/webgpu_backdrop_area.html

image

@sunag sunag added this to the r154 milestone Jun 27, 2023
@sunag sunag marked this pull request as ready for review June 27, 2023 05:08

} else {

this._renderObjectDirect( object, scene, camera, geometry, material, group, lightsNode );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should here also use frontSide or backSide namespace depending on material side? Not sure if I understood the namespaces approach correctly...

Copy link
Collaborator Author

@sunag sunag Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Namespace can cause confusion, I renamed the term to pass id, seems more appropriate. It is compared with a parameter in chain map to get a unique RenderObject:

const renderObject = this._objects.get( object, material, scene, camera, lightsNode, passId )

...

return chainMaps[ passId ].get( object, material, scene, camera, lightsNode );

@sunag sunag changed the title WebGPURenderer: RenderObjects Namespace and Double Pass WebGPURenderer: Render Pass ID and Double Pass Jun 27, 2023
@sunag sunag merged commit 872ad80 into mrdoob:dev Jun 28, 2023
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.

2 participants