Skip to content

Commit

Permalink
Merge pull request #3905 from AnalyticalGraphicsInc/sun-tests
Browse files Browse the repository at this point in the history
Fix failing sun tests with WebGL validation on.
  • Loading branch information
lilleyse committed May 9, 2016
2 parents 36eb270 + 3ac3568 commit c976592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Scene/Sun.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ define([
this._glowFactorDirty = false;

var size = Math.max(drawingBufferWidth, drawingBufferHeight);
size = Math.pow(2.0, Math.ceil(Math.log(size) / Math.log(2.0)) - 2.0);
size = Math.max(1.0, Math.pow(2.0, Math.ceil(Math.log(size) / Math.log(2.0)) - 2.0));

this._texture = new Texture({
context : context,
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/SunPostProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ define([

var downSampleWidth = Math.pow(2.0, Math.ceil(Math.log(width) / Math.log(2)) - 2.0);
var downSampleHeight = Math.pow(2.0, Math.ceil(Math.log(height) / Math.log(2)) - 2.0);
var downSampleSize = Math.max(downSampleWidth, downSampleHeight);
var downSampleSize = Math.max(1.0, Math.max(downSampleWidth, downSampleHeight));

var downSampleViewport = downSampleViewportBoundingRectangle;
downSampleViewport.width = downSampleSize;
Expand Down

0 comments on commit c976592

Please sign in to comment.