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",
|
||||
|
||||
@@ -196,7 +196,7 @@ void BasePass::render() {
|
||||
},
|
||||
.rasterizationState =
|
||||
{
|
||||
.cullMode = Gfx::SE_CULL_MODE_NONE,
|
||||
.cullMode = Gfx::SE_CULL_MODE_BACK_BIT,
|
||||
},
|
||||
.colorBlend =
|
||||
{
|
||||
|
||||
@@ -77,7 +77,10 @@ class VertexData {
|
||||
const Array<TransparentDraw>& getTransparentData() const { return transparentData; }
|
||||
const Array<Gfx::PBottomLevelAS>& getRayTracingData() const { return rayTracingScene; }
|
||||
const MeshData& getMeshData(MeshId id) const { return meshData[id]; }
|
||||
void registerBottomLevelAccelerationStructure(Gfx::PBottomLevelAS blas) { dataToBuild.add(blas); }
|
||||
void registerBottomLevelAccelerationStructure(Gfx::PBottomLevelAS blas) {
|
||||
assert(blas != nullptr);
|
||||
dataToBuild.add(blas);
|
||||
}
|
||||
uint64 getIndicesOffset(uint32 meshletIndex) { return meshlets[meshletIndex].indicesOffset; }
|
||||
uint64 getNumInstances() const { return instanceData.size(); }
|
||||
static List<VertexData*> getList();
|
||||
|
||||
@@ -142,7 +142,7 @@ void Seele::beginCompilation(const ShaderCompilationInfo& info, SlangCompileTarg
|
||||
for (size_t i = 0; i < signature->getParameterCount(); ++i) {
|
||||
auto param = signature->getParameterByIndex(i);
|
||||
layout->addMapping(param->getName(), param->getBindingIndex());
|
||||
std::cout << param->getName() << ": " << param->getBindingIndex() << std::endl;
|
||||
//std::cout << param->getName() << ": " << param->getBindingIndex() << std::endl;
|
||||
}
|
||||
|
||||
// workaround
|
||||
|
||||
Reference in New Issue
Block a user