cesium-examples/map/3d/data/3DWind/glsl/postProcessingSpeed.frag

15 lines
402 B
GLSL
Raw Normal View History

uniform sampler2D postProcessingPosition;
uniform sampler2D nextParticlesSpeed;
varying vec2 v_textureCoordinates;
void main() {
vec4 randomParticle = texture2D(postProcessingPosition, v_textureCoordinates);
vec4 particleSpeed = texture2D(nextParticlesSpeed, v_textureCoordinates);
if (randomParticle.a > 0.0) {
gl_FragColor = vec4(0.0);
} else {
gl_FragColor = particleSpeed;
}
}