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

MeshBasicNodeMaterial: Add envMap support. #28795

Merged
merged 1 commit into from
Jul 3, 2024
Merged

MeshBasicNodeMaterial: Add envMap support. #28795

merged 1 commit into from
Jul 3, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jul 3, 2024

Related issue: #28785

Description

I thought I give it a go and add envMap support to MeshBasicNodeMaterial.

It seems a similar change must be implemented for MeshLambertNodeMaterial and MeshPhongNodeMaterial since both materials types should sample environment maps in the same fashion.

BTW: NodeMaterial must distinct somehow which materials should use EnvironmentNode and which should use the code from this PR. Only PBR materials support Scene.environment and PMREM and that is what EnvironmentNode is about.

Copy link

github-actions bot commented Jul 3, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
682.2 kB (169 kB) 682.2 kB (169 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
459.4 kB (110.9 kB) 459.4 kB (110.9 kB) +0 B
@sunag
Copy link
Collaborator

sunag commented Jul 3, 2024

It seems a similar change must be implemented for MeshLambertNodeMaterial and MeshPhongNodeMaterial since both materials types should sample environment maps in the same fashion.

In this case, it would be interesting to have an intermediate Node with this code.

@sunag sunag merged commit 8f06bf8 into mrdoob:dev Jul 3, 2024
12 checks passed
@sunag sunag added this to the r167 milestone Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants