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

MeshDepthMaterial: Fix broken depthPacking. #23801

Merged
merged 2 commits into from
Mar 30, 2022
Merged

MeshDepthMaterial: Fix broken depthPacking. #23801

merged 2 commits into from
Mar 30, 2022

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Mar 28, 2022

Related issue: #23784 (comment)

Description

MeshDepthMaterial.depthPacking is not processed by WebGLProgram and WebGLPrograms correctly.

@@ -259,7 +259,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
doubleSided: material.side === DoubleSide,
flipSided: material.side === BackSide,

depthPacking: ( material.depthPacking !== undefined ) ? material.depthPacking : false,
useDepthPacking: !! material.depthPacking,
depthPacking: material.depthPacking || 0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought using two variables makes the code more clear. useDepthPacking defines whether depth packing should be used or not. depthPacking defines the type of depth packing.

@Mugen87 Mugen87 added this to the r140 milestone Mar 29, 2022
@Mugen87 Mugen87 merged commit 98c84ee into mrdoob:dev Mar 30, 2022
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Mar 30, 2022

Updated builds: a458bc3

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* MeshDepthMaterial: Fix broken depthPacking.

* Clean up.
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