Im trying to load a texture twice. Once with CLAMP and another with REPEAT. As sometimes I want the texture to repeat and othertimes I would like it to be clamped.
When I try to do this, then it does not repeat.
Example;
<CoordinateSystem> { Z-Up }
<Texture> texture1 {
a.bmp
<Scalar> wrap { CLAMP }
}
<Texture> texture2 {
a.bmp
<Scalar> wrap { REPEAT }
}
<Group> {
<VertexPool> myVerts {
<Vertex> 1 {
0 0 0
<UV> { 0 0 }
}
<Vertex> 2 {
1 0 0
<UV> { 1 0 }
}
<Vertex> 3 {
1 0 1
<UV> { 1 1 }
}
<Vertex> 4 {
0 0 1
<UV> { 0 1 }
}
<Vertex> 5 {
3 0 0
<UV> { 0 0 }
}
<Vertex> 6 {
5 0 0
<UV> { 2 0 }
}
<Vertex> 7 {
5 0 1
<UV> { 2 1 }
}
<Vertex> 8 {
3 0 1
<UV> { 0 1 }
}
}
<Group> myPolys {
<Polygon> {
<TRef> { texture1 }
<VertexRef> { 1 2 3 4 <Ref> { myVerts } }
}
<Polygon> {
<TRef> { texture2 }
<VertexRef> { 5 6 7 8 <Ref> { myVerts } }
}
}
}
The left texture will be clamped and the right repeated. But the right side one is clamped to the texture length and then the right side of it is repeated until the polygon edge.
Now if I change polygon { texture1 } to { texture 2}, it then repeats correctly for the polygon on the right side. But my problem is I get texture-bleed on the polys that should have the texture clamped.
Any ideas?