Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them has been replaced with a symlink. Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still be present.
25 lines
773 B
GLSL
25 lines
773 B
GLSL
float pulse(float freq) {
|
|
return 0.5 + 0.25 * sin(iGlobalTime * freq);
|
|
}
|
|
float varyingTime(float minv, float maxv, float m) {
|
|
float range = (maxv - minv);
|
|
return (minv + range/2) + (range/2) * sin(iGlobalTime * m);
|
|
}
|
|
float wrappingTime(float minv, float maxv, float m) {
|
|
float range = (maxv - minv);
|
|
return (minv + range/2) + (range/2) * mod(iGlobalTime * m, 1);
|
|
}
|
|
float getProceduralColors(inout vec3 diffuse, inout vec3 specular, inout float shininess) {
|
|
|
|
float size = 0.6;
|
|
if (abs(_modelNormal.y) > size) {
|
|
discard;
|
|
}
|
|
float c = texture(iChannel0, _texCoord0.xy).r;
|
|
diffuse = vec3(0.5, 1.0, 0.8) * c;
|
|
if (abs(wrappingTime(-0.5, 1.0, 0.2) - c) > 0.1) {
|
|
discard;
|
|
}
|
|
return 0.0;
|
|
}
|
|
|