Skip to content

Commit

Permalink
Skip unnecessary mipmap generation
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwych committed Nov 17, 2023
1 parent d906581 commit d1b871b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions packages/renderer/webgl2/3d-preview/cubemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ export default function generateCubeMap(
);
}

if (mipmap) {
gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
}

// ===
const projectionMatrix = glm.mat4.perspective(glm.mat4.create(), toRadians(90), 1, 0.1, 10);
const views = [
Expand Down
1 change: 0 additions & 1 deletion packages/renderer/webgl2/node-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ export default class WebGLNodeRenderer {
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA16F, width, height, 0, gl.RGBA, gl.FLOAT, null);
gl.texParameterf(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, mapFilterMethodToGL(filter));
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, mapFilterMethodToMipmapGL(filter));
gl.generateMipmap(gl.TEXTURE_2D);

if (repeat) {
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
Expand Down

0 comments on commit d1b871b

Please sign in to comment.