fs_update_3d.sc 377 B

1234567891011121314151617
  1. $input v_texcoord0
  2. /*
  3. * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
  4. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
  5. */
  6. #include "../common/common.sh"
  7. SAMPLER3D(s_texColor, 0);
  8. uniform vec4 u_time;
  9. void main()
  10. {
  11. vec3 uvw = vec3(v_texcoord0.xy*0.5+0.5, sin(u_time.x)*0.5+0.5);
  12. gl_FragColor = vec4_splat(texture3D(s_texColor, uvw).x);
  13. }