NightVision.js 528 B

123456789101112131415
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "uniform sampler2D colorTexture;\n\
  3. varying vec2 v_textureCoordinates;\n\
  4. float rand(vec2 co)\n\
  5. {\n\
  6. return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n\
  7. }\n\
  8. void main(void)\n\
  9. {\n\
  10. float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\n\
  11. vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n\
  12. vec3 green = vec3(0.0, 1.0, 0.0);\n\
  13. gl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n\
  14. }\n\
  15. ";