AdditiveBlend.js 542 B

123456789101112131415
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "uniform sampler2D colorTexture;\n\
  3. uniform sampler2D colorTexture2;\n\
  4. uniform vec2 center;\n\
  5. uniform float radius;\n\
  6. varying vec2 v_textureCoordinates;\n\
  7. void main()\n\
  8. {\n\
  9. vec4 color0 = texture2D(colorTexture, v_textureCoordinates);\n\
  10. vec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\n\
  11. float x = length(gl_FragCoord.xy - center) / radius;\n\
  12. float t = smoothstep(0.5, 0.8, x);\n\
  13. gl_FragColor = mix(color0 + color1, color1, t);\n\
  14. }\n\
  15. ";