Skip to content

Commit

Permalink
Merge pull request #2359 from AnalyticalGraphicsInc/ieCompileFailure
Browse files Browse the repository at this point in the history
Fix shader compilation failure in IE11.
  • Loading branch information
mramato committed Dec 30, 2014
2 parents b28c879 + a29b0ac commit 65dfeea
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Source/Scene/GlobeSurfaceShaderSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,19 @@ define([

vs.sources.push(getPositionMode);

if (sceneMode !== SceneMode.SCENE3D) {
var get2DYPositionFractionGeographicProjection = 'float get2DYPositionFraction() { return get2DGeographicYPositionFraction(); }';
var get2DYPositionFractionMercatorProjection = 'float get2DYPositionFraction() { return get2DMercatorYPositionFraction(); }';
var get2DYPositionFractionGeographicProjection = 'float get2DYPositionFraction() { return get2DGeographicYPositionFraction(); }';
var get2DYPositionFractionMercatorProjection = 'float get2DYPositionFraction() { return get2DMercatorYPositionFraction(); }';

var get2DYPositionFraction;
var get2DYPositionFraction;

if (useWebMercatorProjection) {
get2DYPositionFraction = get2DYPositionFractionMercatorProjection;
} else {
get2DYPositionFraction = get2DYPositionFractionGeographicProjection;
}

vs.sources.push(get2DYPositionFraction);
if (useWebMercatorProjection) {
get2DYPositionFraction = get2DYPositionFractionMercatorProjection;
} else {
get2DYPositionFraction = get2DYPositionFractionGeographicProjection;
}

vs.sources.push(get2DYPositionFraction);

var shader = context.createShaderProgram(vs, fs, this._attributeLocations);
surfaceShader = shadersByFlags[flags] = new GlobeSurfaceShader(numberOfDayTextures, flags, shader);
}
Expand Down

0 comments on commit 65dfeea

Please sign in to comment.