-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
52 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
uniform sampler2D trailsColorTexture; | ||
uniform sampler2D trailsDepthTexture; | ||
|
||
varying vec2 textureCoordinate; | ||
in vec2 textureCoordinate; | ||
out vec4 outputColor; | ||
|
||
void main() { | ||
vec4 trailsColor = texture2D(trailsColorTexture, textureCoordinate); | ||
float trailsDepth = texture2D(trailsDepthTexture, textureCoordinate).r; | ||
float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, textureCoordinate)); | ||
vec4 trailsColor = texture(trailsColorTexture, textureCoordinate); | ||
float trailsDepth = texture(trailsDepthTexture, textureCoordinate).r; | ||
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, textureCoordinate)); | ||
|
||
if (trailsDepth < globeDepth) { | ||
gl_FragColor = trailsColor; | ||
outputColor = trailsColor; | ||
} else { | ||
gl_FragColor = vec4(0.0); | ||
outputColor = vec4(0.0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
out vec4 outputColor; | ||
|
||
void main() { | ||
const vec4 white = vec4(1.0); | ||
gl_FragColor = white; | ||
outputColor = white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
uniform sampler2D currentParticlesPosition; // (lon, lat, lev) | ||
uniform sampler2D particlesSpeed; // (u, v, w, norm) Unit converted to degrees of longitude and latitude | ||
|
||
varying vec2 v_textureCoordinates; | ||
in vec2 v_textureCoordinates; | ||
out vec4 outputColor; | ||
|
||
void main() { | ||
// texture coordinate must be normalized | ||
vec3 lonLatLev = texture2D(currentParticlesPosition, v_textureCoordinates).rgb; | ||
vec3 speed = texture2D(particlesSpeed, v_textureCoordinates).rgb; | ||
vec3 lonLatLev = texture(currentParticlesPosition, v_textureCoordinates).rgb; | ||
vec3 speed = texture(particlesSpeed, v_textureCoordinates).rgb; | ||
vec3 nextParticle = lonLatLev + speed; | ||
|
||
gl_FragColor = vec4(nextParticle, 0.0); | ||
outputColor = vec4(nextParticle, 0.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters