mirror of
https://github.com/holub/mame
synced 2025-07-07 19:03:29 +03:00
Fixed misaligned scanlines with odd resolutions
- fixed misaligned scanline with odd resolutions caused by centered coordinates
This commit is contained in:
parent
d1d9dfc2d4
commit
be2590932b
@ -368,7 +368,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
|
||||
// todo: there is an offset which can be noticed at lower prescale in high-resolution
|
||||
float2 ScanlinePrescaleOffset = 0.0f;
|
||||
|
||||
float InnerSine = BaseCoordCentered.y * ScanlineScale * SourceDims.y;
|
||||
float InnerSine = BaseCoord.y * ScanlineScale * SourceDims.y;
|
||||
float ScanJitter = ScanlineOffset * SourceDims.y;
|
||||
float ScanBrightMod = sin(InnerSine * PI + ScanJitter + ScanlinePrescaleOffset);
|
||||
float3 ScanColor = lerp(1.0f, (pow(ScanBrightMod * ScanBrightMod, ScanlineHeight) * ScanlineBrightScale + 1.0f + ScanlineBrightOffset) * 0.5f, ScanlineAlpha);
|
||||
|
Loading…
Reference in New Issue
Block a user