mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-14 07:26:16 +00:00
Attempts to avoid introducing phase error in scanToComposition.
Also brightens S-Video up to RGB levels.
This commit is contained in:
@@ -398,7 +398,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
|
|||||||
SignalProcessing::FIRFilter chrominancefilter(15, cyclesPerLine, 0.0f, colourCyclesPerLine * 0.25f);
|
SignalProcessing::FIRFilter chrominancefilter(15, cyclesPerLine, 0.0f, colourCyclesPerLine * 0.25f);
|
||||||
const auto calculatedCoefficients = chrominancefilter.get_coefficients();
|
const auto calculatedCoefficients = chrominancefilter.get_coefficients();
|
||||||
for(size_t c = 0; c < 8; ++c) {
|
for(size_t c = 0; c < 8; ++c) {
|
||||||
firCoefficients[c].y = firCoefficients[c].z = calculatedCoefficients[c] * (isSVideoOutput ? 3.0f : 1.0f);
|
firCoefficients[c].y = firCoefficients[c].z = calculatedCoefficients[c] * (isSVideoOutput ? 4.0f : 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
uniforms()->radiansPerPixel = (colourCyclesPerLine * 3.141592654f * 2.0f) / cyclesPerLine;
|
uniforms()->radiansPerPixel = (colourCyclesPerLine * 3.141592654f * 2.0f) / cyclesPerLine;
|
||||||
|
@@ -193,7 +193,7 @@ vertex SourceInterpolator scanToComposition( constant Uniforms &uniforms [[buffe
|
|||||||
// Map position into eye space, allowing for target texture dimensions.
|
// Map position into eye space, allowing for target texture dimensions.
|
||||||
const float2 textureSize = float2(texture.get_width(), texture.get_height());
|
const float2 textureSize = float2(texture.get_width(), texture.get_height());
|
||||||
result.position.xy =
|
result.position.xy =
|
||||||
((result.position.xy + float2(0.5f)) / textureSize)
|
((result.position.xy + float2(0.0f, 0.5f)) / textureSize)
|
||||||
* float2(2.0f, -2.0f) + float2(-1.0f, 1.0f);
|
* float2(2.0f, -2.0f) + float2(-1.0f, 1.0f);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user