Skip to content

Instantly share code, notes, and snippets.

@feliwir
Created February 2, 2016 13:25
Show Gist options
  • Save feliwir/245b96d5c8593cbf937f to your computer and use it in GitHub Desktop.
Save feliwir/245b96d5c8593cbf937f to your computer and use it in GitHub Desktop.
namespace hpse
{
class Material : public IResource
{
public:
int m_maxTessellation;
float m_displacementFactor;
std::string m_diffuseTexture;
std::string m_normalTexture;
std::string m_specularTexture;
std::string m_displacementTexture;
std::string m_ambientOccTexture;
void Load(const std::string &path);
template<class Archive>
void serialize(Archive& archive);
};
}
{
"material":
{
"max_tessellation": 64,
"displacement_factor": 0.01,
"diffuse": "terrain/cliff_wall.dds",
"normal": "terrain/cliff_wall_norm.dds",
"specular": "terrain/cliff_wall_spec.dds",
"displacement": "terrain/cliff_wall_disp.dds",
"ambient_occ": "terrain/cliff_wall_ao.dds"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment