toolpaths_cog.fs 374 B

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