fragment.fs 380 B

12345678910111213141516
  1. #version 430
  2. layout (binding = 0) uniform sampler3D samp;
  3. in vec3 varTexture;
  4. out vec4 color;
  5. void main(void) {
  6. //float f = texture(samp, varTexture).r;
  7. float x = varTexture.x - int(varTexture.x);
  8. float y = varTexture.y - int(varTexture.y);
  9. float z = varTexture.z - int(varTexture.z);
  10. color = vec4(x, y, z, 1.0);
  11. //color = vec4(varTexture, 0.0, 1.0);
  12. }