Skip to content

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