2
0

HairShaders.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2026 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <Jolt/Core/Reference.h>
  6. #include <Jolt/Compute/ComputeSystem.h>
  7. JPH_NAMESPACE_BEGIN
  8. /// This class loads the shaders used by the hair system. This can be shared among all hair instances.
  9. class JPH_EXPORT HairShaders : public RefTarget<HairShaders>
  10. {
  11. public:
  12. /// Loads all shaders
  13. /// Note that if you want to run the sim on CPU you need call HairRegisterShaders first.
  14. void Init(ComputeSystem *inComputeSystem);
  15. Ref<ComputeShader> mTeleportCS;
  16. Ref<ComputeShader> mApplyDeltaTransformCS;
  17. Ref<ComputeShader> mSkinVerticesCS;
  18. Ref<ComputeShader> mSkinRootsCS;
  19. Ref<ComputeShader> mApplyGlobalPoseCS;
  20. Ref<ComputeShader> mCalculateCollisionPlanesCS;
  21. Ref<ComputeShader> mGridClearCS;
  22. Ref<ComputeShader> mGridAccumulateCS;
  23. Ref<ComputeShader> mGridNormalizeCS;
  24. Ref<ComputeShader> mIntegrateCS;
  25. Ref<ComputeShader> mUpdateRootsCS;
  26. Ref<ComputeShader> mUpdateStrandsCS;
  27. Ref<ComputeShader> mUpdateVelocityCS;
  28. Ref<ComputeShader> mUpdateVelocityIntegrateCS;
  29. Ref<ComputeShader> mCalculateRenderPositionsCS;
  30. };
  31. JPH_NAMESPACE_END