make intensity controllable
This commit is contained in:
parent
edba782f7c
commit
180043db0b
|
@ -33,6 +33,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
unsafe static void RunScanlines(byte* srcPtr, int srcPitch, byte* destPtr, int dstPitch, int width, int height)
|
||||
{
|
||||
const int intensity = (int)((0.75f) * 256);
|
||||
byte* srcLine = srcPtr;
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
|
@ -56,13 +57,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
//second copied line (2x width, 25%)
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
*destPtr++ = (byte)((s[0]*3) >> 2);
|
||||
*destPtr++ = (byte)((s[1]*3) >> 2);
|
||||
*destPtr++ = (byte)((s[2]*3) >> 2);
|
||||
*destPtr++ = (byte)((s[0] * intensity) >> 8);
|
||||
*destPtr++ = (byte)((s[1] * intensity) >> 8);
|
||||
*destPtr++ = (byte)((s[2] * intensity) >> 8);
|
||||
*destPtr++ = s[3];
|
||||
*destPtr++ = (byte)((s[0]*3) >> 2);
|
||||
*destPtr++ = (byte)((s[1]*3) >> 2);
|
||||
*destPtr++ = (byte)((s[2]*3) >> 2);
|
||||
*destPtr++ = (byte)((s[0] * intensity) >> 8);
|
||||
*destPtr++ = (byte)((s[1] * intensity) >> 8);
|
||||
*destPtr++ = (byte)((s[2] * intensity) >> 8);
|
||||
*destPtr++ = s[3];
|
||||
s += 4;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue