Skip to content

Commit

Permalink
fix: make lod example work again -- bad minFilter default.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhouston committed Jul 16, 2020
1 parent b37ac9d commit 51d0d76
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"jest": "^26.0.1",
"prettier": "^2.0.5",
"semantic-release": "^17.0.8",
"threeify-glsl-transpiler": "1.1.12",
"threeify-glsl-transpiler": "1.1.13",
"ts-jest": "^26.1.0",
"typedoc": "^0.17.8",
"typescript": "^3.9.3"
Expand Down Expand Up @@ -95,4 +95,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
1 change: 1 addition & 0 deletions src/examples/cubemaps/lod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ async function init(): Promise<null> {
mipCount: cubeTexture.mipCount,
cubeMap: makeTexImage2DFromCubeTexture(context, cubeTexture),
};

const bufferGeometry = makeBufferGeometryFromGeometry(context, geometry);
const depthTestState = new DepthTestState(true, DepthTestFunc.Less);

Expand Down
3 changes: 2 additions & 1 deletion src/lib/renderers/webgl/textures/TexImage2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export class TexImage2D implements IDisposable {
const numLevels = Math.floor(this.images.length / 6);
for (let level = 0; level < numLevels; level++) {
for (let face = 0; face < 6; face++) {
const image = images[level * 6 + face];
const imageIndex = level * 6 + face;
const image = images[imageIndex];
this.loadImage(image, TextureTarget.CubeMapPositiveX + face, level);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/shaders/includes/materials/material_outputs.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#pragma include <operations/normals/packing>
#pragma include <normals/packing>
#pragma include "output_flags"

vec4 getMaterialOutput( int materialOutput, vec4 viewPosition, vec3 viewNormal, vec4 albedo, float metalness, float roughness, vec4 beauty ) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/textures/CubeTexture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class CubeMapTexture extends VirtualTexture implements IPoolUser {
public images: TextureSource[],
level = 0,
magFilter = TextureFilter.Linear,
minFilter = TextureFilter.Linear,
minFilter = TextureFilter.LinearMipmapLinear,
pixelFormat = PixelFormat.RGBA,
dataType = DataType.UnsignedByte,
generateMipmaps = true,
Expand Down
3 changes: 3 additions & 0 deletions threeify.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
},
{
"path": "../threeify.org"
},
{
"path": "../threeify-glsl-transpiler"
}
],
"extensions": {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9317,10 +9317,10 @@ thenify-all@^1.0.0:
dependencies:
any-promise "^1.0.0"

[email protected].12:
version "1.1.12"
resolved "https://registry.yarnpkg.com/threeify-glsl-transpiler/-/threeify-glsl-transpiler-1.1.12.tgz#c6967600254a2cacadab9026c9f80c9086c1ed8a"
integrity sha512-jN1nVl7CDgpI87CC5CV5SpqtRnfBNtKhiIbJanTbpFvlbwFZVn5vYwEWZNJJxrZoLF3tsCpKysJcOxX6fjOJTA==
[email protected].13:
version "1.1.13"
resolved "https://registry.yarnpkg.com/threeify-glsl-transpiler/-/threeify-glsl-transpiler-1.1.13.tgz#5265379f2aa3970e5173bb067cbc0604a6342276"
integrity sha512-4/aCgwyw8GHrMiy8er2uMof1PJwblaru8Uplhtys4JvbX7coIDNFEQriIi5S25FM8CAQIVeFHd39cLUgvIQN6Q==
dependencies:
commander "^5.1.0"
glob "^7.1.6"
Expand Down

0 comments on commit 51d0d76

Please sign in to comment.