CustomeActor uv is error
Opened this issue · 0 comments
recter commented
old:
FVertexInstanceID Instance1 = MeshDescBuilder.AppendInstance(MeshDescBuilder.AppendVertex(Verties[Indices[i]]));
MeshDescBuilder.SetInstanceNormal(Instance1, FVector(-0.7071, 0, 0.7071)); //法线
MeshDescBuilder.SetInstanceUV(Instance1, FVector2D(0, 1), 0); //UV
const FVector4f f1 = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
MeshDescBuilder.SetInstanceColor(Instance1, f1); //顶点色
FVertexInstanceID Instance2 = MeshDescBuilder.AppendInstance(MeshDescBuilder.AppendVertex(Verties[Indices[i + 1]]));
MeshDescBuilder.SetInstanceNormal(Instance1, FVector(-0.7071, 0, 0.7071)); //法线
MeshDescBuilder.SetInstanceUV(Instance1, FVector2D(1, 0), 0); //UV
MeshDescBuilder.SetInstanceColor(Instance1, f1); //顶点色
FVertexInstanceID Instance3 = MeshDescBuilder.AppendInstance(MeshDescBuilder.AppendVertex(Verties[Indices[i + 2]]));
MeshDescBuilder.SetInstanceNormal(Instance1, FVector(-0.7071, 0, 0.7071)); //法线
MeshDescBuilder.SetInstanceUV(Instance1, FVector2D(0, 0), 0); //UV
MeshDescBuilder.SetInstanceColor(Instance1, f1); //顶点色
must be:
FVertexInstanceID Instance1 = MeshDescBuilder.AppendInstance(MeshDescBuilder.AppendVertex(Verties[Indices[i]]));
MeshDescBuilder.SetInstanceNormal(Instance1, FVector(-0.7071, 0, 0.7071)); //法线
MeshDescBuilder.SetInstanceUV(Instance1, FVector2D(0, 1), 0); //UV
const FVector4f f1 = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
MeshDescBuilder.SetInstanceColor(Instance1, f1); //顶点色
FVertexInstanceID Instance2 = MeshDescBuilder.AppendInstance(MeshDescBuilder.AppendVertex(Verties[Indices[i + 1]]));
MeshDescBuilder.SetInstanceNormal(Instance2, FVector(-0.7071, 0, 0.7071)); //法线
MeshDescBuilder.SetInstanceUV(Instance2, FVector2D(1, 0), 0); //UV
MeshDescBuilder.SetInstanceColor(Instance2, f1); //顶点色
FVertexInstanceID Instance3 = MeshDescBuilder.AppendInstance(MeshDescBuilder.AppendVertex(Verties[Indices[i + 2]]));
MeshDescBuilder.SetInstanceNormal(Instance3, FVector(-0.7071, 0, 0.7071)); //法线
MeshDescBuilder.SetInstanceUV(Instance3, FVector2D(0, 0), 0); //UV
MeshDescBuilder.SetInstanceColor(Instance3, f1); //顶点色