mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Material initialization.
Fixes material initialization for texture and transparency assignments. Lists all available material properties to console in debug builds. Adds TORQUE_PBR_MATERIALS define for testing with PBR branches.
This commit is contained in:
parent
0859b29fa1
commit
ad29d3132e
2 changed files with 277 additions and 64 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#ifndef _APPMATERIAL_H_
|
||||
#include "ts/loader/appMaterial.h"
|
||||
#endif
|
||||
#include <assimp/scene.h>
|
||||
|
||||
class Material;
|
||||
|
||||
|
|
@ -34,18 +35,22 @@ class AssimpAppMaterial : public AppMaterial
|
|||
typedef AppMaterial Parent;
|
||||
|
||||
String name;
|
||||
LinearColorF diffuseColor;
|
||||
LinearColorF specularColor;
|
||||
F32 specularPower;
|
||||
bool doubleSided;
|
||||
aiMaterial* mAIMat;
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
void enumerateMaterialProperties(aiMaterial* mtl);
|
||||
#endif
|
||||
static String cleanTextureName(String& texName, String& shapeName);
|
||||
|
||||
public:
|
||||
|
||||
AssimpAppMaterial(const char* matName);
|
||||
AssimpAppMaterial(const struct aiMaterial* mtl);
|
||||
AssimpAppMaterial(aiMaterial* mtl);
|
||||
~AssimpAppMaterial() { }
|
||||
|
||||
String getName() const { return name; }
|
||||
Material* createMaterial(const Torque::Path& path) const;
|
||||
void initMaterial(const Torque::Path& path, Material* mat) const;
|
||||
};
|
||||
|
||||
#endif // _ASSIMP_APPMATERIAL_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue