-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Material: Remove alphaWrite #23361
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
Merged
Merged
Material: Remove alphaWrite #23361
+5
−9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
0b5vr
added a commit
to 0b5vr/three-ts-types
that referenced
this pull request
Jan 28, 2022
3 tasks
joshuaellis
added a commit
to three-types/three-ts-types
that referenced
this pull request
Mar 1, 2022
* fix(WebXRManager): setAnimationLoop should accept null like WebGLRenderer (#158) * fix: Missing Property in Raycaster (#160) * Fix Missing Property in Raycaster Adds uv2 to Intersection interface to more accurately reflect the original documentation. See: (https://threejs.org/docs/#api/en/core/Raycaster.intersectObject)[https://threejs.org/docs/#api/en/core/Raycaster.intersectObject] This has been submitted in response to Josh's request in (this PR)[DefinitelyTyped/DefinitelyTyped#58462] * Add name to contributors * r137 (#162) * feat: autodetect sRGB compression * feat: remove inline sRGB decode * chore: remove roughness mipmapper * feat: added constant SRGB8 * feat: WebGLCubeUVMaps: Add support for render targets * chore: Remove RGBFormat (#159) * change: Remove RGBFormat See: mrdoob/three.js#23223 See: mrdoob/three.js#23228 * change: Remove .format from Material See: mrdoob/three.js#23219 It will be replaced with .alphaWrite later See: mrdoob/three.js#23166 * test: remove use of RGBFormat from a test case * feat: add LDrawUtils * chore: make ConvexGeometry points optional * chore: remove RGBIntegerFormat * feat: Box3 now supports computing minimal bounds for setFromObject * feat(Material): Add a new property .alphaWrite (#161) Since it's undocumented I could not fill the doc comment properly,,, See: mrdoob/three.js#23166 * chore: remove UnsignedShort565Type * chore: remove RoomEnvironment from OTHER_FILES * chore: remove LDrawLoader from OTHER_FILES * chore: fix linting * chore: fix linting Co-authored-by: 0b5vr <0b5vr@0b5vr.com> * feat: add PackedPhongMaterial * fix: Scene Utils are not in namespace resolves #153 * r137 * change (Material): remove `alphaWrite` See: mrdoob/three.js#23361 Co-authored-by: Cody Bennett <hi@codyb.co> Co-authored-by: Joe Tipping <39060404+Gallahron@users.noreply.github.com> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
MykhailoStrelnykov
pushed a commit
to Chronos-Samples/three-ts-types
that referenced
this pull request
Dec 22, 2025
* fix(WebXRManager): setAnimationLoop should accept null like WebGLRenderer (three-types#158) * fix: Missing Property in Raycaster (three-types#160) * Fix Missing Property in Raycaster Adds uv2 to Intersection interface to more accurately reflect the original documentation. See: (https://threejs.org/docs/#api/en/core/Raycaster.intersectObject)[https://threejs.org/docs/#api/en/core/Raycaster.intersectObject] This has been submitted in response to Josh's request in (this PR)[DefinitelyTyped/DefinitelyTyped#58462] * Add name to contributors * r137 (three-types#162) * feat: autodetect sRGB compression * feat: remove inline sRGB decode * chore: remove roughness mipmapper * feat: added constant SRGB8 * feat: WebGLCubeUVMaps: Add support for render targets * chore: Remove RGBFormat (three-types#159) * change: Remove RGBFormat See: mrdoob/three.js#23223 See: mrdoob/three.js#23228 * change: Remove .format from Material See: mrdoob/three.js#23219 It will be replaced with .alphaWrite later See: mrdoob/three.js#23166 * test: remove use of RGBFormat from a test case * feat: add LDrawUtils * chore: make ConvexGeometry points optional * chore: remove RGBIntegerFormat * feat: Box3 now supports computing minimal bounds for setFromObject * feat(Material): Add a new property .alphaWrite (three-types#161) Since it's undocumented I could not fill the doc comment properly,,, See: mrdoob/three.js#23166 * chore: remove UnsignedShort565Type * chore: remove RoomEnvironment from OTHER_FILES * chore: remove LDrawLoader from OTHER_FILES * chore: fix linting * chore: fix linting Co-authored-by: 0b5vr <0b5vr@0b5vr.com> * feat: add PackedPhongMaterial * fix: Scene Utils are not in namespace resolves three-types#153 * r137 * change (Material): remove `alphaWrite` See: mrdoob/three.js#23361 Co-authored-by: Cody Bennett <hi@codyb.co> Co-authored-by: Joe Tipping <39060404+Gallahron@users.noreply.github.com> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #23353
Description
(Hoping to merge this ASAP and publish
0.137.3)After #23230 we now have a regression when someone does this: https://jsfiddle.net/7rt8L1jo/
The best way that I can think of to fix that is to set
gl_FragColor = 1.0in the shader whentransparent === false, which is pretty much what I tried to do in #18631 two years ago.As far as I can read, the only use case that that change broke was this:
Which I think is totally fair to break in exchange of solving this regression.
To me
material.transparent = falsemeans that the object is opaque so forcing alpha to 1.0 makes sense.After this change
material.alphaWrite(introduced in #23166) is no longer needed./cc @Mugen87 @donmccurdy @WestLangley