Skip to content

Commit

Permalink
Modify random value texture sampling.
Browse files Browse the repository at this point in the history
  • Loading branch information
bagnell committed May 3, 2018
1 parent 6e53e43 commit 5e11e9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Scene/PostProcessStageCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ define([
height : 256
},
sampler : new Sampler({
wrapS : TextureWrap.CLAMP_TO_EDGE,
wrapT : TextureWrap.CLAMP_TO_EDGE,
wrapS : TextureWrap.REPEAT,
wrapT : TextureWrap.REPEAT,
minificationFilter : TextureMinificationFilter.NEAREST,
magnificationFilter : TextureMagnificationFilter.NEAREST
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ void main(void)
float gapAngle = 90.0 * czm_radiansPerDegree;

// RandomNoise
vec2 noiseMapSize = vec2(256.0, 256.0);
vec2 noiseScale = vec2(czm_viewport.z / noiseMapSize.x, czm_viewport.w / noiseMapSize.y);
float randomVal = texture2D(randomTexture, v_textureCoordinates * noiseScale).x;
float randomVal = texture2D(randomTexture, v_textureCoordinates).x;

float inverseViewportWidth = 1.0 / czm_viewport.z;
float inverseViewportHeight = 1.0 / czm_viewport.w;
Expand Down

0 comments on commit 5e11e9e

Please sign in to comment.