Implement TransformVertex for PC

This commit is contained in:
Luke Benstead 2021-04-21 17:21:03 +01:00
parent 26c9a454e4
commit f7424ea5bd
2 changed files with 16 additions and 0 deletions

View File

@ -328,3 +328,18 @@ void TransformVertices(Vertex* vertices, const int count) {
vertices->w = ret[3];
}
}
void TransformVertex(const float* xyz, const float* w, float* oxyz, float* ow) {
float ret[4];
ret[0] = xyz[0];
ret[1] = xyz[1];
ret[2] = xyz[2];
ret[3] = *w;
TransformVec4(ret);
oxyz[0] = ret[0];
oxyz[1] = ret[1];
oxyz[2] = ret[2];
*ow = ret[3];
}

View File

@ -50,6 +50,7 @@ static inline void TransformNormalNoMod(const float* xIn, float* xOut) {
}
void TransformVertices(Vertex* vertices, const int count);
void TransformVertex(const float* xyz, const float* w, float* oxyz, float* ow);
void InitGPU(_Bool autosort, _Bool fsaa);