Skip to content

Commit

Permalink
Change Billboard depth function from LESS to LEQUAL.
Browse files Browse the repository at this point in the history
  • Loading branch information
emackey committed Nov 22, 2016
1 parent 3550a1f commit 79a1962
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Change Log
* Breaking changes
*
* Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. This results in a 25% reduction in load times in many cases.
* Billboard depth testing changed from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap.
* Added support for saving html and css in Github Gists. [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125)
* Fixed `Cartographic.fromCartesian` when the cartesian is not on the ellipsoid surface. [#4611](https://github.com/AnalyticalGraphicsInc/cesium/issues/4611)

Expand Down
5 changes: 4 additions & 1 deletion Source/Scene/BillboardCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ define([
'../Renderer/ShaderProgram',
'../Renderer/ShaderSource',
'../Renderer/VertexArrayFacade',
'../Renderer/WebGLConstants',
'../Shaders/BillboardCollectionFS',
'../Shaders/BillboardCollectionVS',
'./Billboard',
Expand Down Expand Up @@ -55,6 +56,7 @@ define([
ShaderProgram,
ShaderSource,
VertexArrayFacade,
WebGLConstants,
BillboardCollectionFS,
BillboardCollectionVS,
Billboard,
Expand Down Expand Up @@ -1424,7 +1426,8 @@ define([
if (!defined(this._rs)) {
this._rs = RenderState.fromCache({
depthTest : {
enabled : true
enabled : true,
func : WebGLConstants.LEQUAL // Allows label glyphs and billboards to overlap.
},
blending : BlendingState.ALPHA_BLEND
});
Expand Down
5 changes: 4 additions & 1 deletion Source/Scene/PointPrimitiveCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ define([
'../Renderer/ShaderProgram',
'../Renderer/ShaderSource',
'../Renderer/VertexArrayFacade',
'../Renderer/WebGLConstants',
'../Shaders/PointPrimitiveCollectionFS',
'../Shaders/PointPrimitiveCollectionVS',
'./BlendingState',
Expand Down Expand Up @@ -49,6 +50,7 @@ define([
ShaderProgram,
ShaderSource,
VertexArrayFacade,
WebGLConstants,
PointPrimitiveCollectionFS,
PointPrimitiveCollectionVS,
BlendingState,
Expand Down Expand Up @@ -852,7 +854,8 @@ define([
if (!defined(this._rs)) {
this._rs = RenderState.fromCache({
depthTest : {
enabled : true
enabled : true,
func : WebGLConstants.LEQUAL
},
blending : BlendingState.ALPHA_BLEND
});
Expand Down

0 comments on commit 79a1962

Please sign in to comment.