mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-01 04:10:30 +00:00
Avoid some operator overloads.
Causing ambiguity.
This commit is contained in:
parent
018d95180a
commit
dfadb67ea1
18
GPU/Math3D.h
18
GPU/Math3D.h
@ -156,12 +156,6 @@ public:
|
||||
Vec2 ts() const { return Vec2(y, x); }
|
||||
};
|
||||
|
||||
template<typename T, typename V>
|
||||
Vec2<T> operator * (const V& f, const Vec2<T>& vec)
|
||||
{
|
||||
return Vec2<T>(f*vec.x,f*vec.y);
|
||||
}
|
||||
|
||||
typedef Vec2<float> Vec2f;
|
||||
|
||||
template<typename T>
|
||||
@ -323,12 +317,6 @@ public:
|
||||
#undef _DEFINE_SWIZZLER2
|
||||
};
|
||||
|
||||
template<typename T, typename V>
|
||||
Vec3<T> operator * (const V& f, const Vec3<T>& vec)
|
||||
{
|
||||
return Vec3<T>(f*vec.x,f*vec.y,f*vec.z);
|
||||
}
|
||||
|
||||
typedef Vec3<float> Vec3f;
|
||||
|
||||
template<typename T>
|
||||
@ -497,12 +485,6 @@ public:
|
||||
#undef _DEFINE_SWIZZLER3
|
||||
};
|
||||
|
||||
template<typename T, typename V>
|
||||
Vec4<T> operator * (const V& f, const Vec4<T>& vec)
|
||||
{
|
||||
return Vec4<T>(f*vec.x,f*vec.y,f*vec.z,f*vec.w);
|
||||
}
|
||||
|
||||
typedef Vec4<float> Vec4f;
|
||||
|
||||
|
||||
|
@ -572,7 +572,7 @@ static inline Vec4<int> GetTextureFunctionOutput(const Vec3<int>& prim_color_rgb
|
||||
{
|
||||
int t = (rgba) ? texcolor.a() : 255;
|
||||
int invt = (rgba) ? 255 - t : 0;
|
||||
out_rgb = (invt * prim_color_rgb + t * texcolor.rgb()) / 255;
|
||||
out_rgb = (prim_color_rgb * invt + texcolor.rgb() * t) / 255;
|
||||
out_a = prim_color_a;
|
||||
break;
|
||||
}
|
||||
|
@ -128,9 +128,9 @@ static VertexData ReadVertex(VertexReader& vreader)
|
||||
|
||||
for (int i = 0; i < vertTypeGetNumBoneWeights(gstate.vertType); ++i) {
|
||||
Mat3x3<float> bone(&gstate.boneMatrix[12*i]);
|
||||
tmppos += W[i] * (bone * ModelCoords(pos[0], pos[1], pos[2]) + Vec3<float>(gstate.boneMatrix[12*i+9], gstate.boneMatrix[12*i+10], gstate.boneMatrix[12*i+11]));
|
||||
tmppos += (bone * ModelCoords(pos[0], pos[1], pos[2]) * W[i] + Vec3<float>(gstate.boneMatrix[12*i+9], gstate.boneMatrix[12*i+10], gstate.boneMatrix[12*i+11]));
|
||||
if (vreader.hasNormal())
|
||||
tmpnrm += W[i] * (bone * vertex.normal);
|
||||
tmpnrm += (bone * vertex.normal) * W[i];
|
||||
}
|
||||
|
||||
pos[0] = tmppos.x;
|
||||
|
Loading…
Reference in New Issue
Block a user