toolpaths_cog.fs 398 B

123456789101112131415161718
  1. #version 100
  2. precision highp float;
  3. const vec3 BLACK = vec3(0.1);
  4. const vec3 WHITE = vec3(0.9);
  5. const float emission_factor = 0.25;
  6. // x = tainted, y = specular;
  7. varying vec2 intensity;
  8. varying vec3 position;
  9. void main()
  10. {
  11. vec3 color = position.x * position.y * position.z > 0.0 ? BLACK : WHITE;
  12. gl_FragColor = vec4(vec3(intensity.y) + color * (intensity.x + emission_factor), 1.0);
  13. }