mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 11:24:02 +00:00
Allow setting the various pixel types to opaque
This commit is contained in:
parent
6f2ee27a0e
commit
be844246cf
3 changed files with 6 additions and 0 deletions
|
@ -93,6 +93,8 @@ class Color : public Vec4f {
|
||||||
|
|
||||||
// Tests for equality by comparing the values and the bit depths.
|
// Tests for equality by comparing the values and the bit depths.
|
||||||
bool operator==(const Color &) const;
|
bool operator==(const Color &) const;
|
||||||
|
|
||||||
|
void MakeOpaque() { A() = 1.f ; }
|
||||||
};
|
};
|
||||||
REGISTER_VECTOR_TYPE(Color);
|
REGISTER_VECTOR_TYPE(Color);
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,8 @@ class IPixel : public VectorBase<float, 1> {
|
||||||
// up in the most-significant byte.
|
// up in the most-significant byte.
|
||||||
uint32 Pack() const;
|
uint32 Pack() const;
|
||||||
void Unpack(uint32 rgba);
|
void Unpack(uint32 rgba);
|
||||||
|
|
||||||
|
void MakeOpaque() { /* Do nothing.. */ }
|
||||||
};
|
};
|
||||||
REGISTER_VECTOR_TYPE(IPixel);
|
REGISTER_VECTOR_TYPE(IPixel);
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,8 @@ class Pixel : public Vector4<int16> {
|
||||||
vec[i] = (vec[i] < 0)? 0 : ((vec[i] > 255)? 255 : vec[i]);
|
vec[i] = (vec[i] < 0)? 0 : ((vec[i] > 255)? 255 : vec[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MakeOpaque() { A() = 255; }
|
||||||
};
|
};
|
||||||
REGISTER_VECTOR_TYPE(Pixel);
|
REGISTER_VECTOR_TYPE(Pixel);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue