修改间距大值 缓冲区bug
This commit is contained in:
@ -55,6 +55,7 @@ function LineTexture() {
|
||||
1.0,
|
||||
result.repeat
|
||||
);
|
||||
result.frameNumber = Cesium.getTimestamp();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -90,7 +91,8 @@ function LineTexture() {
|
||||
czm_material material = czm_getDefaultMaterial(materialInput);
|
||||
vec2 st = materialInput.st;
|
||||
st.s *= repeat; // 关键:通过repeat控制纹理密度
|
||||
vec4 colorImage = texture2D(image, vec2(fract(st.s + speed*czm_frameNumber* 0.01), st.t));
|
||||
// vec4 colorImage = texture2D(image, vec2(fract(st.s + speed*czm_frameNumber* 0.01), st.t));
|
||||
vec4 colorImage = speed==0.0?texture2D(image, vec2(fract(st.s), st.t)):texture2D(image, vec2(fract(st.s + frameNumber / 1000.0 / speed * repeat ), st.t));
|
||||
material.alpha = colorImage.a * color.a;
|
||||
material.diffuse = color.rgb;
|
||||
return material;
|
||||
@ -106,6 +108,7 @@ function LineTexture() {
|
||||
image: '',
|
||||
repeat: 1.0,
|
||||
speed: 1.0,
|
||||
frameNumber: Cesium.getTimestamp(),
|
||||
uTime: 1
|
||||
},
|
||||
source: Cesium.Material.LineTextureMaterialSource,
|
||||
|
Reference in New Issue
Block a user