Add existing to tracked
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
uniform vec4 color;
|
||||
uniform float glowPower;
|
||||
uniform float taperPower;
|
||||
|
||||
czm_material czm_getMaterial(czm_materialInput materialInput)
|
||||
{
|
||||
czm_material material = czm_getDefaultMaterial(materialInput);
|
||||
|
||||
vec2 st = materialInput.st;
|
||||
float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
|
||||
|
||||
if (taperPower <= 0.99999) {
|
||||
glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
|
||||
}
|
||||
|
||||
vec4 fragColor;
|
||||
fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
|
||||
fragColor.a = clamp(glow, 0.0, 1.0) * color.a;
|
||||
fragColor = czm_gammaCorrect(fragColor);
|
||||
|
||||
material.emission = fragColor.rgb;
|
||||
material.alpha = fragColor.a;
|
||||
|
||||
return material;
|
||||
}
|
||||
Reference in New Issue
Block a user