mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-25 08:32:48 -06:00
Round primary color inputs in software rasterizer
OpenGL version coming soon.
This commit is contained in:
parent
d55a13c35d
commit
dc48deaecc
1 changed files with 8 additions and 8 deletions
|
@ -293,18 +293,18 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
|||
};
|
||||
|
||||
Math::Vec4<u8> primary_color{
|
||||
(u8)(
|
||||
static_cast<u8>(round(
|
||||
GetInterpolatedAttribute(v0.color.r(), v1.color.r(), v2.color.r()).ToFloat32() *
|
||||
255),
|
||||
(u8)(
|
||||
255)),
|
||||
static_cast<u8>(round(
|
||||
GetInterpolatedAttribute(v0.color.g(), v1.color.g(), v2.color.g()).ToFloat32() *
|
||||
255),
|
||||
(u8)(
|
||||
255)),
|
||||
static_cast<u8>(round(
|
||||
GetInterpolatedAttribute(v0.color.b(), v1.color.b(), v2.color.b()).ToFloat32() *
|
||||
255),
|
||||
(u8)(
|
||||
255)),
|
||||
static_cast<u8>(round(
|
||||
GetInterpolatedAttribute(v0.color.a(), v1.color.a(), v2.color.a()).ToFloat32() *
|
||||
255),
|
||||
255)),
|
||||
};
|
||||
|
||||
Math::Vec2<float24> uv[3];
|
||||
|
|
Loading…
Reference in a new issue