UNPKG

vue-cesium

Version:
1 lines 2.01 kB
{"version":3,"file":"VcLineFlowMaterial.mjs","sources":["../../../../../../packages/shared/shaders/materials/VcLineFlowMaterial.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2023-08-17 00:10:56\n * @Description: Do not edit\n * @LastEditors: zouyaoji 370681295@qq.com\n * @LastEditTime: 2023-08-17 00:15:37\n * @FilePath: \\vue-cesium\\packages\\shared\\shaders\\materials\\LineFlowMaterial.ts\n */\nexport default `\nuniform float globalAlpha;\nuniform bool axisY;\nuniform bool mixt;\n\nczm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n\n vec4 colorImage;\n if (speed != 0.0) {\n float currTime;\n if (time < 0.0) {\n currTime = speed * czm_frameNumber / 1000.0;\n } else {\n currTime = time;\n }\n colorImage = texture(image, vec2(fract((axisY ? st.t : st.s) - currTime), st.t));\n } else {\n colorImage = texture(image, st);\n }\n\n if (color.a == 0.0) {\n if (colorImage.rgb == vec3(1.0)) {\n discard;\n }\n }\n\n if (color.rgb == vec3(1.0)) {\n material.alpha = colorImage.a * globalAlpha;\n material.diffuse = colorImage.rgb;\n } else {\n material.alpha = colorImage.a * color.a * globalAlpha;\n if (mixt)\n material.diffuse = max(colorImage.rgb * color.rgb * material.alpha * 3.0, colorImage.rgb * color.rgb);\n else\n material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\n }\n\n if (hasImage2) {\n vec4 colorBG = texture(image2, materialInput.st);\n if (colorBG.a > 0.5) {\n material.diffuse = color2.rgb;\n }\n }\n return material;\n}\n`\n"],"names":[],"mappings":";AAQA,yBAAe,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;"}