Commit b6f9e543 authored by hybrid's avatar hybrid

Make proper texture coords which are not clamped...

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1789 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4a89e8f7
...@@ -1596,9 +1596,9 @@ void CColladaFileLoader::readBindMaterialSection(io::IXMLReaderUTF8* reader, con ...@@ -1596,9 +1596,9 @@ void CColladaFileLoader::readBindMaterialSection(io::IXMLReaderUTF8* reader, con
SceneManager->getMeshManipulator()->setVertexColors(&tmpmesh,material->Mat.DiffuseColor); SceneManager->getMeshManipulator()->setVertexColors(&tmpmesh,material->Mat.DiffuseColor);
if ((material->Transparency!=0.0f) && (material->Transparency!=1.0f)) if ((material->Transparency!=0.0f) && (material->Transparency!=1.0f))
{ {
#ifdef COLLADA_READER_DEBUG #ifdef COLLADA_READER_DEBUG
os::Printer::log("COLLADA found transparency material", core::stringc(material->Transparency).c_str()); os::Printer::log("COLLADA found transparency material", core::stringc(material->Transparency).c_str());
#endif #endif
SceneManager->getMeshManipulator()->setVertexColorAlpha(&tmpmesh, core::floor32(material->Transparency*255.0f)); SceneManager->getMeshManipulator()->setVertexColorAlpha(&tmpmesh, core::floor32(material->Transparency*255.0f));
} }
} }
...@@ -2087,7 +2087,7 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -2087,7 +2087,7 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
case ECIS_TEXCOORD: case ECIS_TEXCOORD:
case ECIS_UV: case ECIS_UV:
vtx.TCoords.X = Inputs[k].Data[idx+0]; vtx.TCoords.X = Inputs[k].Data[idx+0];
vtx.TCoords.Y = -Inputs[k].Data[idx+1]; vtx.TCoords.Y = 1-Inputs[k].Data[idx+1];
break; break;
case ECIS_TANGENT: case ECIS_TANGENT:
break; break;
...@@ -2215,12 +2215,12 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -2215,12 +2215,12 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
if (k==secondTexCoordSetIndex) if (k==secondTexCoordSetIndex)
{ {
vtx.TCoords2.X = Inputs[k].Data[idx+0]; vtx.TCoords2.X = Inputs[k].Data[idx+0];
vtx.TCoords2.Y = -Inputs[k].Data[idx+1]; vtx.TCoords2.Y = 1-Inputs[k].Data[idx+1];
} }
else else
{ {
vtx.TCoords.X = Inputs[k].Data[idx+0]; vtx.TCoords.X = Inputs[k].Data[idx+0];
vtx.TCoords.Y = -Inputs[k].Data[idx+1]; vtx.TCoords.Y = 1-Inputs[k].Data[idx+1];
} }
break; break;
case ECIS_TANGENT: case ECIS_TANGENT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment