Add existing to tracked
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
uniform vec4 lightColor;
|
||||
uniform vec4 darkColor;
|
||||
uniform vec2 repeat;
|
||||
|
||||
czm_material czm_getMaterial(czm_materialInput materialInput)
|
||||
{
|
||||
czm_material material = czm_getDefaultMaterial(materialInput);
|
||||
|
||||
// From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
|
||||
float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0
|
||||
|
||||
vec4 color = mix(lightColor, darkColor, b);
|
||||
color = czm_gammaCorrect(color);
|
||||
material.diffuse = color.rgb;
|
||||
material.alpha = color.a;
|
||||
|
||||
return material;
|
||||
}
|
||||
Reference in New Issue
Block a user