Implemented punch-through / alpha tested material support, enabled with the "alpha_test true" in the material file.

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4064
This commit is contained in:
kearwood
2012-08-09 23:40:32 +00:00
parent 61027da1cf
commit e8ad725d45
11 changed files with 67 additions and 23 deletions

View File

@@ -116,7 +116,11 @@ bool KRMaterialManager::loadFile(const char *szPath) {
m_materials[szSymbol[1]] = pMaterial;
}
if(pMaterial != NULL) {
if(strcmp(szSymbol[0], "Ka") == 0) {
if(strcmp(szSymbol[0], "alpha_test") == 0) {
if(cSymbols == 2) {
pMaterial->setAlphaTest(strcmp(szSymbol[1], "true") == 0);
}
} else if(strcmp(szSymbol[0], "Ka") == 0) {
char *pScan2 = szSymbol[1];
double r = strtof(pScan2, &pScan2);
if(cSymbols == 2) {