自定义材质颜色优化
This commit is contained in:
@ -70,7 +70,7 @@ function StreamWall1() {
|
|||||||
fragColor.rgb = color.rgb / 1.0;\n\
|
fragColor.rgb = color.rgb / 1.0;\n\
|
||||||
fragColor = czm_gammaCorrect(fragColor);\n\
|
fragColor = czm_gammaCorrect(fragColor);\n\
|
||||||
material.alpha = colorImage.a * color.a;\n\
|
material.alpha = colorImage.a * color.a;\n\
|
||||||
material.diffuse = (colorImage.rgb+color.rgb)/2.0;\n\
|
material.diffuse = color.rgb/20.0;\n\
|
||||||
material.emission = fragColor.rgb;\n\
|
material.emission = fragColor.rgb;\n\
|
||||||
return material;\n\
|
return material;\n\
|
||||||
}";
|
}";
|
||||||
@ -208,6 +208,14 @@ function StreamWall2() {
|
|||||||
Property.equals(this.repeat, other._repeat) &&
|
Property.equals(this.repeat, other._repeat) &&
|
||||||
Property.equals(this.repeats, other._repeats)
|
Property.equals(this.repeats, other._repeats)
|
||||||
};
|
};
|
||||||
|
// let code2 = 'material.diffuse = color.rgb*1.0;'
|
||||||
|
// if (uniforms.is2D) {
|
||||||
|
// code2 = `
|
||||||
|
// material.diffuse = color.rgb*0.0;
|
||||||
|
// material.emission = color.rgb * 1.0;
|
||||||
|
// `
|
||||||
|
// }
|
||||||
|
// console.log(code2, uniforms.is2D)
|
||||||
// 将定义的材质对象添加到cesium的材质队列中
|
// 将定义的材质对象添加到cesium的材质队列中
|
||||||
Material._materialCache.addMaterial(MaterialType, {
|
Material._materialCache.addMaterial(MaterialType, {
|
||||||
fabric: {
|
fabric: {
|
||||||
@ -230,8 +238,8 @@ function StreamWall2() {
|
|||||||
else {
|
else {
|
||||||
material.alpha = 1.0;
|
material.alpha = 1.0;
|
||||||
}
|
}
|
||||||
material.diffuse = colorImage.rgb*color.rgb*0.0;
|
material.diffuse = color.rgb*0.0;
|
||||||
material.emission = colorImage.rgb*color.rgb * 1.4;
|
material.emission = color.rgb * 1.0;
|
||||||
return material;
|
return material;
|
||||||
}`,
|
}`,
|
||||||
components: {
|
components: {
|
||||||
|
Reference in New Issue
Block a user