Skip to content

Commit 48536bd

Browse files
authored
Merge pull request #5335 from AnalyticalGraphicsInc/material-translucent
Fix Material translucency
2 parents 41ba0b0 + 2507b51 commit 48536bd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Change Log
2525
* Upgrade FXAA to version 3.11. [#5200](https://github.com/AnalyticalGraphicsInc/cesium/pull/5200)
2626
* `Scene.pickPosition` now caches results per frame to increase performance. [#5117](https://github.com/AnalyticalGraphicsInc/cesium/issues/5117)
2727
* Fixed bug where polylines would not update when `PolylineCollection` model matrix was updated [#5327](https://github.com/AnalyticalGraphicsInc/cesium/pull/5327)
28+
* Fixed translucency bug for certain material types [#5335](https://github.com/AnalyticalGraphicsInc/cesium/pull/5335)
2829

2930
### 1.32 - 2017-04-03
3031

Source/Scene/Material.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ define([
12681268
},
12691269
translucent : function(material) {
12701270
var uniforms = material.uniforms;
1271-
return (uniforms.evenColor.alpha < 1.0) || (uniforms.oddColor.alpha < 0.0);
1271+
return (uniforms.evenColor.alpha < 1.0) || (uniforms.oddColor.alpha < 1.0);
12721272
}
12731273
});
12741274

@@ -1290,7 +1290,7 @@ define([
12901290
},
12911291
translucent : function(material) {
12921292
var uniforms = material.uniforms;
1293-
return (uniforms.lightColor.alpha < 1.0) || (uniforms.darkColor.alpha < 0.0);
1293+
return (uniforms.lightColor.alpha < 1.0) || (uniforms.darkColor.alpha < 1.0);
12941294
}
12951295
});
12961296

@@ -1312,7 +1312,7 @@ define([
13121312
},
13131313
translucent : function(material) {
13141314
var uniforms = material.uniforms;
1315-
return (uniforms.lightColor.alpha < 1.0) || (uniforms.darkColor.alpha < 0.0);
1315+
return (uniforms.lightColor.alpha < 1.0) || (uniforms.darkColor.alpha < 1.0);
13161316
}
13171317
});
13181318

@@ -1340,7 +1340,7 @@ define([
13401340
},
13411341
translucent : function(material) {
13421342
var uniforms = material.uniforms;
1343-
return (uniforms.baseWaterColor.alpha < 1.0) || (uniforms.blendColor.alpha < 0.0);
1343+
return (uniforms.baseWaterColor.alpha < 1.0) || (uniforms.blendColor.alpha < 1.0);
13441344
}
13451345
});
13461346

@@ -1362,7 +1362,7 @@ define([
13621362
},
13631363
translucent : function(material) {
13641364
var uniforms = material.uniforms;
1365-
return (uniforms.color.alpha < 1.0) || (uniforms.rimColor.alpha < 0.0);
1365+
return (uniforms.color.alpha < 1.0) || (uniforms.rimColor.alpha < 1.0);
13661366
}
13671367
});
13681368

0 commit comments

Comments
 (0)