Material.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #include <map>
  3. #include <optional>
  4. #include <string>
  5. #include <vector>
  6. #include "Types.h"
  7. namespace WallpaperEngine::Data::Model {
  8. enum BlendingMode {
  9. BlendingMode_Unknown = 0,
  10. BlendingMode_Normal = 1,
  11. BlendingMode_Translucent = 2,
  12. BlendingMode_Additive = 3,
  13. /** Drawn like normal; shadow casters test their albedo's alpha (sub_140224C70, sub_140155FC0) */
  14. BlendingMode_AlphaToCoverage = 4,
  15. };
  16. enum CullingMode { CullingMode_Unknown = 0, CullingMode_Normal = 1, CullingMode_Disable = 2 };
  17. enum DepthtestMode {
  18. DepthtestMode_Unknown = 0,
  19. DepthtestMode_Disabled = 1,
  20. DepthtestMode_Enabled = 2,
  21. };
  22. enum DepthwriteMode {
  23. DepthwriteMode_Unknown = 0,
  24. DepthwriteMode_Disabled = 1,
  25. DepthwriteMode_Enabled = 2,
  26. };
  27. struct MaterialPass {
  28. BlendingMode blending;
  29. CullingMode cullmode;
  30. DepthtestMode depthtest;
  31. DepthwriteMode depthwrite;
  32. std::string shader;
  33. TextureMap textures;
  34. TextureMap usertextures;
  35. ComboMap combos;
  36. ShaderConstantMap constants;
  37. std::string alphawriting = "default";
  38. };
  39. struct Material {
  40. std::string filename;
  41. std::vector<MaterialPassUniquePtr> passes;
  42. };
  43. }