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

Materials: Convert to classes. #21626

Merged
merged 1 commit into from
Apr 9, 2021
Merged

Materials: Convert to classes. #21626

merged 1 commit into from
Apr 9, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Apr 9, 2021

Related issue: -

Description

Converts the remaining materials to class syntax.

It was necessary to migrate the "old" NodeMaterial. However, I'm not going to convert the complete jsm/nodes directory since it will be replaced at some point with the new node material in jsm/renderers/nodes.

@mrdoob
Copy link
Owner

mrdoob commented Apr 9, 2021

/fyi @sunag

@mrdoob mrdoob merged commit 76744cb into mrdoob:dev Apr 9, 2021
@mrdoob
Copy link
Owner

mrdoob commented Apr 9, 2021

Thanks!

@sunag
Copy link
Collaborator

sunag commented Apr 9, 2021

I believe that we will maintain the properties of the materials used in the WebGPU version when this migration happens?

@Mugen87 Mugen87 mentioned this pull request Apr 9, 2021
43 tasks
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Apr 14, 2021

believe that we will maintain the properties of the materials used in the WebGPU version when this migration happens?

Do you mind explaining in more detail what you mean?

@sunag
Copy link
Collaborator

sunag commented Apr 16, 2021

StandardNodeMaterial is a minimalist node-based material while MeshStandardNodeMaterial is a hybrid version, supports default material values as well nodes. MeshStandardMaterial of WebGPU uses differents properties names like .colorNode and .alphaNode. For this reason, I think that we no need continue with this old API syntax (StandardNodeMaterial) or need?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Apr 16, 2021

Ah okay. Yes @mrdoob mentioned that existing material properties should still work. I also think this is best since ideally it will make the transition from WebGL to WebGPU easier.

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.

3 participants