Skip to content

Conversation

@11zouzouzou
Copy link
Contributor

Unable to set the correct unpackAlignment when cubeTexture is set to dataTexture. So when i set the dataTexture(dataType:RBG) to Cubetexture the system will warn me and not work.

To solve:set the correct unpackAlignment

@Mugen87 Mugen87 changed the title Fix the BUG:dataTexture set DataTexture WebGLTextures: Set all pixel storage modes for CubeTexture. Dec 29, 2020
@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 29, 2020

NIT: Please move both two new lines right below the existing:

_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );

The all pixelStorei() calls in uploadCubeTexture() are grouped together.

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 29, 2020

@mrdoob Do you know if there was a specific reason for excluding the following lines when using CubeTexture?

_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );

@11zouzouzou
Copy link
Contributor Author

11zouzouzou commented Dec 29, 2020

The unpackAlignment is needed

@11zouzouzou
Copy link
Contributor Author

11zouzouzou commented Dec 29, 2020

UNPACK_PREMULTIPLY_ALPHA_WEBGL.Webgl will have default Settings. If not set it, it is the default setting

@11zouzouzou 11zouzouzou requested a review from Mugen87 December 30, 2020 07:19
@mrdoob
Copy link
Owner

mrdoob commented Dec 30, 2020

@mrdoob Do you know if there was a specific reason for excluding the following lines when using CubeTexture?

Not that I know of.

@mrdoob mrdoob added this to the r125 milestone Dec 30, 2020
@mrdoob mrdoob merged commit c0bcb18 into mrdoob:dev Dec 30, 2020
@mrdoob
Copy link
Owner

mrdoob commented Dec 30, 2020

Thanks!

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.

3 participants