Improvements to the way blending between materials is handled.
This commit is contained in:
parent
c695a7bc86
commit
e820b3de6e
@ -85,6 +85,11 @@ namespace PolyVox
|
||||
std::vector<SurfaceVertex> m_vecVertices;
|
||||
|
||||
std::vector<LodRecord> m_vecLodRecords;
|
||||
|
||||
//The set of materials which are in this mesh. Only those materials
|
||||
//which cover a whole triangle are counted. Materials which only
|
||||
//exist on a material boundary do not count.
|
||||
std::set<uint8_t> m_mapUsedMaterials;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,11 @@ namespace PolyVox
|
||||
m_vecTriangleIndices.push_back(index1);
|
||||
m_vecTriangleIndices.push_back(index2);
|
||||
|
||||
if((m_vecVertices[index0].material != m_vecVertices[index1].material) || (m_vecVertices[index0].material != m_vecVertices[index2].material))
|
||||
if((m_vecVertices[index0].material == m_vecVertices[index1].material) && (m_vecVertices[index0].material == m_vecVertices[index2].material))
|
||||
{
|
||||
m_mapUsedMaterials.insert(m_vecVertices[index0].material);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vecVertices[index0].m_bIsMaterialEdgeVertex = true;
|
||||
m_vecVertices[index1].m_bIsMaterialEdgeVertex = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user