fix mipmap (#4332)

This commit is contained in:
Yun Hsiao Wu
2019-04-28 17:12:50 +08:00
committed by Weiliang Wang
parent c447bf5eff
commit 59fe2706df
3 changed files with 14 additions and 12 deletions
+9 -9
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -55,7 +55,7 @@ export class AvatarModelComponent extends SkinningModelComponent {
private _units: Array<IAvatarUnit | null> = [];
@property({ visible: false })
@property({ override: true, visible: false })
get mesh (): Mesh | null {
return this._mesh;
}
+4 -2
View File
@@ -2094,7 +2094,9 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web
glWrapT = gl.CLAMP_TO_EDGE;
}
if (gpuTexture.isPowerOf2 && gpuTexture.mipLevel > 1) {
if (gpuTexture.isPowerOf2
// && gpuTexture.mipLevel > 1
) {
glMinFilter = gpuSampler.glMinFilter;
} else {
if (gpuSampler.glMinFilter === gl.LINEAR ||
@@ -2574,7 +2576,7 @@ export function WebGLCmdFuncCopyBuffersToTexture (
region.texOffset.x, region.texOffset.y, w, h,
gpuTexture.glFormat, pixels);
} else {
gl.compressedTexImage2D(gl.TEXTURE_2D, m,
gl.compressedTexImage2D(gl.TEXTURE_2D, m,
gpuTexture.glInternelFmt, w, h, 0, pixels);
}
}