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

Global: Avoid usage of RGBFormat. #23219

Merged
merged 1 commit into from
Jan 13, 2022
Merged

Global: Avoid usage of RGBFormat. #23219

merged 1 commit into from
Jan 13, 2022

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 13, 2022

Related issue: -

Description

Avoids the usage of RGBFormat whenever possible in the docs and editor.

@mrdoob mrdoob added this to the r137 milestone Jan 13, 2022
@mrdoob mrdoob merged commit e6a7e7d into mrdoob:dev Jan 13, 2022
@mrdoob
Copy link
Owner

mrdoob commented Jan 13, 2022

Thanks!

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jan 13, 2022

The following section is the last usage of THREE.RGBFormat.

newRenderTarget = new WebGLRenderTarget(
glProjLayer.textureWidth,
glProjLayer.textureHeight,
{
format: attributes.alpha ? RGBAFormat : RGBFormat,
type: UnsignedByteType,
depthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ),
stencilBuffer: attributes.stencil,
ignoreDepth: glProjLayer.ignoreDepthValues,
encoding: renderer.outputEncoding
} );

@cabanier Is it possible to always create the render target in the RGBA format? Or would this require that all XR scenes set the WebGL context parameter alpha to true?

@cabanier
Copy link
Contributor

@cabanier Is it possible to always create the render target in the RGBA format? Or would this require that all XR scenes set the WebGL context parameter alpha to true?

No, that is unrelated. I'd love if we just removed plain RGB. This format is so slow that we actually allocate it as RGBA under the hood and then pretend it doesn't have an alpha channel. I'm sure this has unintended side effects.

0b5vr added a commit to 0b5vr/three-ts-types that referenced this pull request Jan 27, 2022
See: mrdoob/three.js#23219

It will be replaced with .alphaWrite later

See: mrdoob/three.js#23166
joshuaellis pushed a commit to three-types/three-ts-types that referenced this pull request Jan 27, 2022
* 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
0b5vr added a commit to 0b5vr/three-ts-types that referenced this pull request Jan 27, 2022
See: mrdoob/three.js#23219

It will be replaced with .alphaWrite later

See: mrdoob/three.js#23166
joshuaellis added a commit to three-types/three-ts-types that referenced this pull request Jan 27, 2022
* 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>
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>
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.

None yet

3 participants