Skip to content

Instantly share code, notes, and snippets.

@SamGondelman
Last active May 17, 2019 01:28
Show Gist options
  • Save SamGondelman/0f0bc47a1113bfe0dee0996bd43acc79 to your computer and use it in GitHub Desktop.
Save SamGondelman/0f0bc47a1113bfe0dee0996bd43acc79 to your computer and use it in GitHub Desktop.
float getProceduralColors(inout vec3 diffuse, inout vec3 specular, inout float shininess) {
TransformCamera cam = getTransformCamera();
vec4 position = cam._viewInverse * _positionES;
if (mod(position.y + cos(iGlobalTime), 0.25) < 0.125 + 0.05 * cos(iGlobalTime * 1.5)) {
discard;
}
diffuse = 0.5 * (normalize(_normalWS) + vec3(1.0));
return 0.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment