Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Mar 21, 2023

Related issue: #25096

Description

This PR removes light related properties from MeshDistanceMaterial.

The near and far values of a point light's shadow camera as well as its position in world space are required in refreshUniformsDistance() so they were previously stored in the material for convenience. However, it's confusing to store them in the material since they are not supposed to set by the user.

The code in WebGLShadowMap and WebGLMaterials has slightly been refactored. The point light itself is now stored in an internal material properties object (similar to environment maps) and then used when setting up the uniforms.

@github-actions
Copy link

github-actions bot commented Mar 21, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize Gzipped Diff from dev
618.2 kB 154.7 kB -229 B

🌳 Bundle size after tree-shaking

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

Filesize Gzipped Diff from dev
409.8 kB 100.8 kB -228 B

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.

1 participant