Skip to content

Commit

Permalink
Merge pull request #310 from guycalledfrank/fixsky1
Browse files Browse the repository at this point in the history
don't use skyboxMip for non-prefiltered cubemaps (fix)
  • Loading branch information
guycalledfrank committed Jun 12, 2015
2 parents cbef557 + 1f8ee3b commit f3f805f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scene/scene_scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,13 @@ pc.extend(pc, function () {
var shader = library.getProgram('skybox', {rgbm:scene._skyboxCubeMap.rgbm,
hdr: (scene._skyboxCubeMap.rgbm || scene._skyboxCubeMap.format===pc.PIXELFORMAT_RGBA32F),
useIntensity: scene.skyboxIntensity!==1,
mip: scene.skyboxMip,
mip: scene._skyboxCubeMap.fixCubemapSeams? scene.skyboxMip : 0,
fixSeams: scene._skyboxCubeMap.fixCubemapSeams, gamma:scene.gammaCorrection, toneMapping:scene.toneMapping});
this.setShader(shader);
};

material.updateShader();
if (!scene._skyboxMip) {
if (!this._skyboxCubeMap.fixCubemapSeams || !scene._skyboxMip) {
material.setParameter("texture_cubeMap", this._skyboxCubeMap);
} else {
var mip2tex = [null, "64", "16", "8", "4"];
Expand Down

0 comments on commit f3f805f

Please sign in to comment.