mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-16 22:08:28 +01:00
Fix gravity lensing applying uniformly to all of RGB
Broken in 7e9d9686dda4, where I accidentally applied the offset calculated for the red channel to all channels, oops.
This commit is contained in:
parent
7c578b7f13
commit
2a7a6a40fd
@ -65,11 +65,10 @@ void Renderer::render_gravlensing(const RendererFrame &source)
|
||||
RES.OriginRect().Contains(bp))
|
||||
{
|
||||
auto v = RGB<uint8_t>::Unpack(video[p]);
|
||||
auto s = RGB<uint8_t>::Unpack(source[rp]);
|
||||
video[p] = RGB<uint8_t>(
|
||||
std::min(0xFF, s.Red + v.Red ),
|
||||
std::min(0xFF, s.Green + v.Green),
|
||||
std::min(0xFF, s.Blue + v.Blue )
|
||||
std::min(0xFF, RGB<uint8_t>::Unpack(source[rp]).Red + v.Red ),
|
||||
std::min(0xFF, RGB<uint8_t>::Unpack(source[gp]).Green + v.Green),
|
||||
std::min(0xFF, RGB<uint8_t>::Unpack(source[bp]).Blue + v.Blue )
|
||||
).Pack();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user