-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Texture: Remove RGBFormat. #23228
Texture: Remove RGBFormat. #23228
Conversation
Thanks! |
Is |
Good catch! Yes, it should also be removed. |
Hi @Mugen87 ,
Do you mind share some info? You know what device/driver/gpu are not supporting natively RGB? |
E.g. all devices using Metal support no 3 channel formats. |
* 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: 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 <[email protected]>
I know it was a necessary step for the futur but it would be great in the futur to add a deprecated flag one version before this kind of big change, some libs dependent on it just exploded following the update like 'postprocessing' : pmndrs/postprocessing#338 |
We can still add a deprecation warning. Would you like to create a PR with it? |
I wonder if somethings like this would do the job with treeshaking :
|
I don't think that does what you want. |
* 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Joe Tipping <[email protected]> Co-authored-by: Josh <[email protected]>
Hey guys, this is pretty old, but I have just come across it. Personally I see this as a fairly big negative. I understand that implementations that exist (WebGL) might be slow on some platforms for RGB, but I feel this step was taken without enough consideration. Here's an example: I have a normal texture, it's RGB, naturally. I now have to invest 33% more space to load it into GPU memory. Let's say that's okay, how about if I use a basis texture? A compressed format that is - those things will work as RGB. So, we're creating a situation where using a complex code path, such as compressed textures - I can have my RGB, but in a normal flow I can't. That just doesn't make sense to me. Warning the user that RGB is not optimal I think is fine, plaster it all over docs, add a comment in @Mugen87 stated:
I can't help but ask - so what? What about all the devices running GL and Vulkan? What of DirectX? Did three.js become a library that targets primarily Apple devices without me being aware of it? That would be okay too, I just fail to find sufficient reasoning for such a drastic (by my estimation) move. |
Sorry, but I think everything was already said regarding this topic and I see no reasons for reviving this discussion. |
Because it's a performance footgun and people shouldn't have spend brain cycles on it. |
@mrdoob I understand the logic, and I do see that it would be difficult to warn users in a way that would both discourage newbies as well as inform more advanced users.
I appreciate that, I did follow the links around the issue, this is where I came ultimately, if there is more public discussion/argumentation on the topic - please send me a link or post it here. I'm not here for a flame war, I just see this as a decision taken too lightly, I accept that there might be a lot more information that I simply did not see yet. Note for those who, like me, might be unfamiliar with Metal API, here's a part from the spec that talks about formats: |
I am unable to use RGB9E5 format for my RGBE texture because of this change. |
R11F_G11F_B10F is also a nice packed format which requires GL_RGB. |
The description of this PR is misleading. |
what should've been done is renaming of RGBFormat to RGBPackedFormat |
The PR focused on the common RGB format usage. It is true that there are specialized packed RGB formats but on the other hand they are used in production not very often. TBH, I have never seen them in the last seven years in the WebGL space. Instead of introducing a new texture.format = 'RGB';
texture.internalFormat = 'RGB9_E5'; Making |
Yeah, this is a great idea. |
@Mugen87 If we wanted to add R11F_G11F_B10F support to KTX2Loader for more compact IBL data, would you recommend using the |
Yes. |
Related issue: -
Description
This PR removes
THREE.RGBFormat
. There are three major reasons for this step:THREE.RGBFormat
is slow. Not all devices natively support RGB texture formats which requires an emulation in software. Several resources in the WebGL space recommend to always use RGBA.Devs who are affected by this change should use
RGBAFormat
instead.