test.frag 414 B

1234567891011121314151617181920212223
  1. #version 110
  2. uniform sampler2D texSampler2D;
  3. uniform sampler3D texSampler3D;
  4. uniform float blend;
  5. uniform vec2 scale;
  6. uniform vec4 u;
  7. varying vec2 t;
  8. varying vec3 coords;
  9. void main()
  10. {
  11. float blendscale = 1.789;
  12. vec4 v = texture2D(texSampler2D, (t + scale) / scale ).wzyx;
  13. vec4 w = texture3D(texSampler3D, coords) + v;
  14. gl_FragColor = mix(w, u, blend * blendscale);
  15. }