mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
LibSoftGPU: Prevent fog from overwriting the alpha channel
Fog only affects the RGB channels according to the spec.
This commit is contained in:
parent
f2d8fcb830
commit
9d90bab91b
1 changed files with 4 additions and 2 deletions
|
@ -742,8 +742,10 @@ void Device::submit_triangle(const Triangle& triangle, Vector<size_t> const& ena
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mix texel with fog
|
// Mix texel's RGB with fog's RBG - leave alpha alone
|
||||||
fragment = mix(m_options.fog_color, fragment, factor);
|
fragment.set_x(mix(m_options.fog_color.x(), fragment.x(), factor));
|
||||||
|
fragment.set_y(mix(m_options.fog_color.y(), fragment.y(), factor));
|
||||||
|
fragment.set_z(mix(m_options.fog_color.z(), fragment.z(), factor));
|
||||||
}
|
}
|
||||||
|
|
||||||
return fragment;
|
return fragment;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue