pine_gpu.h 808 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <QVector3D>
  3. #include <QVector4D>
  4. #include <cstdint>
  5. namespace Render::GL {
  6. struct PineInstanceGpu {
  7. QVector4D pos_scale;
  8. QVector4D color_sway;
  9. QVector4D rotation;
  10. };
  11. struct PineBatchParams {
  12. static constexpr float kDefaultLightDirX = 0.35F;
  13. static constexpr float kDefaultLightDirY = 0.8F;
  14. static constexpr float kDefaultLightDirZ = 0.45F;
  15. static constexpr float kDefaultWindStrength = 0.3F;
  16. static constexpr float kDefaultWindSpeed = 0.5F;
  17. static auto default_light_direction() -> QVector3D {
  18. return {kDefaultLightDirX, kDefaultLightDirY, kDefaultLightDirZ};
  19. }
  20. QVector3D light_direction = default_light_direction();
  21. float time = 0.0F;
  22. float wind_strength = kDefaultWindStrength;
  23. float wind_speed = kDefaultWindSpeed;
  24. };
  25. } // namespace Render::GL