Merge pull request #83 from rahwang/default-mip-mapping

make mip-mapping on by default
This commit is contained in:
Sean Lilley 2017-06-14 19:42:04 -04:00 committed by GitHub
commit 5aa9aa9abf
3 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ Change Log
### 1.1.1 2017-04-25
* Fixed `CHANGES.md` formatting.
* Change texture sampling to use NEAREST_MIPMAP_LINEAR by default [#83](https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/83).
### 1.1.0 2017-04-25

View File

@ -126,7 +126,7 @@ function createGltf(objData) {
if (Object.keys(images).length > 0) {
gltf.samplers[samplerId] = {
magFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.NEAREST_MIPMAP_LINEAR,
wrapS : WebGLConstants.REPEAT,
wrapT : WebGLConstants.REPEAT
};

View File

@ -143,7 +143,7 @@ describe('createGltf', function() {
expect(gltf.samplers.sampler).toEqual({
magFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.NEAREST_MIPMAP_LINEAR,
wrapS : WebGLConstants.REPEAT,
wrapT : WebGLConstants.REPEAT
});