instancesVertex.js 1.0 KB

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