FXAA.js 675 B

1234567891011121314151617181920
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "varying vec2 v_textureCoordinates;\n\
  3. uniform sampler2D colorTexture;\n\
  4. const float fxaaQualitySubpix = 0.5;\n\
  5. const float fxaaQualityEdgeThreshold = 0.125;\n\
  6. const float fxaaQualityEdgeThresholdMin = 0.0833;\n\
  7. void main()\n\
  8. {\n\
  9. vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n\
  10. vec4 color = FxaaPixelShader(\n\
  11. v_textureCoordinates,\n\
  12. colorTexture,\n\
  13. fxaaQualityRcpFrame,\n\
  14. fxaaQualitySubpix,\n\
  15. fxaaQualityEdgeThreshold,\n\
  16. fxaaQualityEdgeThresholdMin);\n\
  17. float alpha = texture2D(colorTexture, v_textureCoordinates).a;\n\
  18. gl_FragColor = vec4(color.rgb, alpha);\n\
  19. }\n\
  20. ";