fragment.fs 309 B

123456789101112131415
  1. #version 430
  2. layout (binding = 0) uniform sampler3D noiseSamp;
  3. layout (binding = 1) uniform sampler3D textureSamp;
  4. uniform float height;
  5. in vec3 varTextureG;
  6. out vec4 color;
  7. void main(void) {
  8. vec3 f = texture(textureSamp, (varTextureG + vec3(0.0, height, 0.0)) * 8.0).xyz;
  9. color = vec4(f, 1.0);
  10. }