Skip to content

Commit

Permalink
Merge pull request #344 from guycalledfrank/fixtexswap
Browse files Browse the repository at this point in the history
consider recompiling shader if tex flags/format differ
  • Loading branch information
guycalledfrank committed Jul 2, 2015
2 parents b23c923 + 45cc001 commit 66987e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scene/scene_phongmaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ pc.extend(pc, function () {
set: function (value) {
var oldVal = this[privMap];
if ((!oldVal && value) || (oldVal && !value)) this.dirtyShader = true;
if (oldVal && value) {
if (oldVal.rgbm!==value.rgbm || oldVal.fixCubemapSeams!==value.fixCubemapSeams || oldVal.format!==value.format) {
this.dirtyShader = true;
}
}
this[privMap] = value;
}
});
Expand Down

0 comments on commit 66987e0

Please sign in to comment.