fragment.fs 507 B

123456789101112131415161718192021
  1. #version 430
  2. layout (binding = 0) uniform sampler3D samp;
  3. in vec3 varTextureG;
  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. float f = texture(samp, varTextureG).r;
  12. color = vec4(f, f, f, 1.0);
  13. //color = vec4(1.0, 1.0, 0.0, 1.0);
  14. //color = vec4(varTexture, 0.0, 1.0);
  15. }