Skip to content

Instantly share code, notes, and snippets.

@vkurchatkin
Created November 15, 2013 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkurchatkin/7486843 to your computer and use it in GitHub Desktop.
Save vkurchatkin/7486843 to your computer and use it in GitHub Desktop.
var cloudAltitude = 1e4
, fabric = {
type : 'Clouds',
uniforms : {
image : '/images/earthcloudmap.jpg',
alphaImage : '/images/earthcloudmaptrans.jpg'
},
components : {
diffuse : 'texture2D(image, materialInput.st).rgb',
alpha : '1.0 - czm_luminance(texture2D(alphaImage, materialInput.st).rgb)'
}
}
primitives.add(new c.EllipsoidPrimitive({
radii : new c.Cartesian3(6378137.0 + cloudAltitude, 6378137.0 + cloudAltitude, 6356752.3142451793 + cloudAltitude)
, material : new c.Material({
fabric : fabric
})
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment