Tangent space works again
This commit is contained in:
@@ -372,12 +372,6 @@ void MeshLoader::loadMaterials(const aiScene* scene, const Array<PTextureAsset>&
|
||||
aiShadingMode mode;
|
||||
material->Get(AI_MATKEY_SHADING_MODEL, mode);
|
||||
switch (mode) {
|
||||
case aiShadingMode_Blinn:
|
||||
brdf.profile = "BlinnPhong";
|
||||
brdf.variables["specularColor"] = outputSpecular;
|
||||
brdf.variables["ambient"] = outputAmbient;
|
||||
brdf.variables["shininess"] = outputShininess;
|
||||
break;
|
||||
case aiShadingMode_Phong:
|
||||
brdf.profile = "Phong";
|
||||
brdf.variables["specular"] = outputSpecular;
|
||||
@@ -387,7 +381,6 @@ void MeshLoader::loadMaterials(const aiScene* scene, const Array<PTextureAsset>&
|
||||
case aiShadingMode_Toon:
|
||||
brdf.profile = "CelShading";
|
||||
break;
|
||||
default:
|
||||
case aiShadingMode_CookTorrance:
|
||||
brdf.profile = "CookTorrance";
|
||||
brdf.variables["roughness"] = outputRoughness;
|
||||
@@ -396,6 +389,13 @@ void MeshLoader::loadMaterials(const aiScene* scene, const Array<PTextureAsset>&
|
||||
brdf.variables["ambientOcclusion"] = outputAmbient;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
case aiShadingMode_Blinn:
|
||||
brdf.profile = "BlinnPhong";
|
||||
brdf.variables["specularColor"] = outputSpecular;
|
||||
brdf.variables["ambient"] = outputAmbient;
|
||||
brdf.variables["shininess"] = outputShininess;
|
||||
break;
|
||||
};
|
||||
uint32 twoSided = false;
|
||||
float opacity = 1.0f;
|
||||
|
||||
@@ -96,13 +96,6 @@ int main() {
|
||||
.filePath = sourcePath / "import/textures/skybox.jpg",
|
||||
.type = TextureImportType::TEXTURE_CUBEMAP,
|
||||
});
|
||||
AssetImporter::importTexture(TextureImportArgs{
|
||||
.filePath = sourcePath / "import/textures/brickwall.jpg",
|
||||
});
|
||||
AssetImporter::importTexture(TextureImportArgs{
|
||||
.filePath = sourcePath / "import/textures/brickwall_normal.jpg",
|
||||
.type = TextureImportType::TEXTURE_NORMAL,
|
||||
});
|
||||
// AssetImporter::importMesh(MeshImportArgs{
|
||||
// .filePath = sourcePath / "import/models/ship.fbx",
|
||||
// .importPath = "ship",
|
||||
|
||||
Reference in New Issue
Block a user