Shipwright/libultraship/libultraship/Material.h
M4xw d24c8453db git subrepo clone https://github.com/HarbourMasters/libultraship.git
subrepo:
  subdir:   "libultraship"
  merged:   "a484cda98"
upstream:
  origin:   "https://github.com/HarbourMasters/libultraship.git"
  branch:   "main"
  commit:   "a484cda98"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-22 02:52:44 +01:00

48 lines
961 B
C++

#include "Resource.h"
namespace Ship
{
enum class MaterialCmt
{
Wrap = 0,
Mirror = 1,
Clamp = 2
};
class ShaderParam
{
public:
strhash name;
DataType dataType;
uint64_t value;
ShaderParam(BinaryReader* reader);
};
class MaterialV0 : public ResourceFile
{
public:
// Typical N64 Stuff
MaterialCmt cmtH, cmtV;
uint8_t clrR, clrG, clrB, clrA, clrM, clrL;
// Modern Stuff
strhash shaderID;
uint32_t shaderParamsCnt;
uint32_t offsetToShaderEntries;
void ParseFileBinary(BinaryReader* reader, Resource* res) override;
};
class Material : public Resource
{
public:
// Typical N64 Stuff
MaterialCmt cmtH, cmtV;
uint8_t clrR, clrG, clrB, clrA, clrM, clrL;
// Modern Stuff
strhash shaderID;
std::vector<ShaderParam*> shaderParams;
};
}