Skip to content

Commit

Permalink
fix(patch): Texture add default internalFormat same to format, in…
Browse files Browse the repository at this point in the history
… webgl1, internalFormat must be the same as format
  • Loading branch information
sakitam-fdd committed Mar 15, 2023
1 parent 2cfd62a commit 1e824b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Texture.ts
Expand Up @@ -183,7 +183,7 @@ export default class Texture<T extends TextureOptions = TextureOptions> extends
target: gl.TEXTURE_2D,
type: gl.UNSIGNED_BYTE,
format: gl.RGBA,
internalFormat: options.internalFormat || gl.RGBA,
internalFormat: options.format || gl.RGBA,
wrapS: gl.CLAMP_TO_EDGE,
wrapT: gl.CLAMP_TO_EDGE,
generateMipmaps: true,
Expand Down
2 changes: 1 addition & 1 deletion src/core/Texture3D.ts
Expand Up @@ -97,7 +97,7 @@ export default class Texture3D extends Texture<Texture3DOptions> {
target: gl.TEXTURE_3D,
type: gl.UNSIGNED_BYTE,
format: gl.RGBA,
internalFormat: options.internalFormat || gl.RGBA,
internalFormat: options.format || gl.RGBA,
wrapS: gl.CLAMP_TO_EDGE,
wrapT: gl.CLAMP_TO_EDGE,
wrapR: gl.CLAMP_TO_EDGE,
Expand Down

0 comments on commit 1e824b1

Please sign in to comment.