instancesDeclaration.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. // Do not edit.
  2. import { ShaderStore } from "../../Engines/shaderStore.js";
  3. const name = "instancesDeclaration";
  4. const shader = `#ifdef INSTANCES
  5. attribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;
  6. #ifdef INSTANCESCOLOR
  7. attribute instanceColor : vec4<f32>;
  8. #endif
  9. #if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
  10. uniform world : mat4x4<f32>;
  11. #endif
  12. #if defined(VELOCITY) || defined(PREPASS_VELOCITY)
  13. attribute previousWorld0 : vec4<f32>;attribute previousWorld1 : vec4<f32>;attribute previousWorld2 : vec4<f32>;attribute previousWorld3 : vec4<f32>;
  14. #ifdef THIN_INSTANCES
  15. uniform previousWorld : mat4x4<f32>;
  16. #endif
  17. #endif
  18. #else
  19. #if !defined(WORLD_UBO)
  20. uniform world : mat4x4<f32>;
  21. #endif
  22. #if defined(VELOCITY) || defined(PREPASS_VELOCITY)
  23. uniform previousWorld : mat4x4<f32>;
  24. #endif
  25. #endif
  26. `;
  27. // Sideeffect
  28. ShaderStore.IncludesShadersStoreWGSL[name] = shader;
  29. /** @internal */
  30. export const instancesDeclaration = { name, shader };
  31. //# sourceMappingURL=instancesDeclaration.js.map