velocity.fragment.js 632 B

1234567891011121314151617
  1. // Do not edit.
  2. import { ShaderStore } from "../Engines/shaderStore.js";
  3. const name = "velocityPixelShader";
  4. const shader = `precision highp float;
  5. #define CUSTOM_FRAGMENT_BEGIN
  6. varying vec4 clipPos;varying vec4 previousClipPos;
  7. #define CUSTOM_FRAGMENT_DEFINITIONS
  8. void main(void) {
  9. #define CUSTOM_FRAGMENT_MAIN_BEGIN
  10. highp vec4 motionVector=( clipPos/clipPos.w-previousClipPos/previousClipPos.w );gl_FragColor=motionVector;
  11. #define CUSTOM_FRAGMENT_MAIN_END
  12. }`;
  13. // Sideeffect
  14. ShaderStore.ShadersStore[name] = shader;
  15. /** @internal */
  16. export const velocityPixelShader = { name, shader };
  17. //# sourceMappingURL=velocity.fragment.js.map