mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-13 13:35:14 +01:00
Round primary color inputs in software rasterizer
OpenGL version coming soon.
This commit is contained in:
parent
d55a13c35d
commit
dc48deaecc
@ -293,18 +293,18 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
|||||||
};
|
};
|
||||||
|
|
||||||
Math::Vec4<u8> primary_color{
|
Math::Vec4<u8> primary_color{
|
||||||
(u8)(
|
static_cast<u8>(round(
|
||||||
GetInterpolatedAttribute(v0.color.r(), v1.color.r(), v2.color.r()).ToFloat32() *
|
GetInterpolatedAttribute(v0.color.r(), v1.color.r(), v2.color.r()).ToFloat32() *
|
||||||
255),
|
255)),
|
||||||
(u8)(
|
static_cast<u8>(round(
|
||||||
GetInterpolatedAttribute(v0.color.g(), v1.color.g(), v2.color.g()).ToFloat32() *
|
GetInterpolatedAttribute(v0.color.g(), v1.color.g(), v2.color.g()).ToFloat32() *
|
||||||
255),
|
255)),
|
||||||
(u8)(
|
static_cast<u8>(round(
|
||||||
GetInterpolatedAttribute(v0.color.b(), v1.color.b(), v2.color.b()).ToFloat32() *
|
GetInterpolatedAttribute(v0.color.b(), v1.color.b(), v2.color.b()).ToFloat32() *
|
||||||
255),
|
255)),
|
||||||
(u8)(
|
static_cast<u8>(round(
|
||||||
GetInterpolatedAttribute(v0.color.a(), v1.color.a(), v2.color.a()).ToFloat32() *
|
GetInterpolatedAttribute(v0.color.a(), v1.color.a(), v2.color.a()).ToFloat32() *
|
||||||
255),
|
255)),
|
||||||
};
|
};
|
||||||
|
|
||||||
Math::Vec2<float24> uv[3];
|
Math::Vec2<float24> uv[3];
|
||||||
|
Loading…
Reference in New Issue
Block a user