mirror of
https://github.com/TomHarte/CLK.git
synced 2025-03-20 03:29:47 +00:00
[Experimentally] introduces blending between computed S-Video fragments.
This commit is contained in:
parent
bf252b8061
commit
f2929230a2
OSBindings/Mac/Clock Signal/ScanTarget
@ -593,7 +593,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
|
||||
pipelineDescriptor.vertexFunction = [library newFunctionWithName:_pipeline == Pipeline::DirectToDisplay ? @"scanToDisplay" : @"lineToDisplay"];
|
||||
|
||||
if(_pipeline != Pipeline::DirectToDisplay) {
|
||||
pipelineDescriptor.fragmentFunction = [library newFunctionWithName:@"copyFragment"];
|
||||
pipelineDescriptor.fragmentFunction = [library newFunctionWithName:@"interpolateFragment"];
|
||||
} else {
|
||||
const bool isRGBOutput = modals.display_type == Outputs::Display::DisplayType::RGB;
|
||||
pipelineDescriptor.fragmentFunction =
|
||||
|
@ -97,17 +97,15 @@ struct SourceInterpolator {
|
||||
float2 textureLocation(constant Line *line, float offset, constant Uniforms &uniforms) {
|
||||
return float2(
|
||||
uniforms.cycleMultiplier * mix(line->endPoints[0].cyclesSinceRetrace, line->endPoints[1].cyclesSinceRetrace, offset),
|
||||
line->line);
|
||||
line->line + 0.5f);
|
||||
}
|
||||
|
||||
float2 textureLocation(constant Scan *scan, float offset, constant Uniforms &) {
|
||||
return float2(
|
||||
mix(scan->endPoints[0].dataOffset, scan->endPoints[1].dataOffset, offset),
|
||||
scan->dataY);
|
||||
scan->dataY + 0.5f);
|
||||
}
|
||||
|
||||
// TODO: add 0.5f to the y coordinates above to ensure the middle of each line is hit?
|
||||
|
||||
template <typename Input> SourceInterpolator toDisplay(
|
||||
constant Uniforms &uniforms [[buffer(1)]],
|
||||
constant Input *inputs [[buffer(0)]],
|
||||
|
Loading…
x
Reference in New Issue
Block a user