WIP: native per-layer controls, host OSC and Metal mask tracking; GPU and callback regressions added, formal host acceptance pending

这个提交包含在:
mac 于 2026-11-01 21:49:38 +08:00 提交
1 父节点 f72aa2609d
当前提交 cec044f124
26 个文件已更改
+475 -40

没有与搜索条件相匹配的文件

+6
查看文件
@@ -49,3 +49,9 @@ kernel void dyTrackFlow(device const float*prev[[buffer(0)]],device const float*
if(ok)ok=trackFlow(next,prev,i,q,p,back,backError,lane)&&distance(back,p)<=1.1f;
if(lane==0)results[idx]=float4(q,error,ok?1.f:0.f);
}
// Full host frame -> top-first display luma. Analysis and reference use the
// same sampler, alpha convention and transfer; no 320x180 inspector preview.
kernel void dyToolCapture(texture2d<float> source [[texture(0)]],device float* pixels [[buffer(0)]],constant uint3& info [[buffer(1)]],uint2 pos [[thread_position_in_grid]]){
if(pos.x>=info.x||pos.y>=info.y)return;constexpr sampler f(coord::normalized,address::clamp_to_edge,filter::linear);float2 uv=(float2(pos)+.5f)/float2(info.xy);if(info.z)uv.y=1-uv.y;float4 sample=source.sample(f,uv);float3 linear=sample.a>0?sample.rgb/sample.a:float3(0);float3 encoded=select(1.055f*pow(max(linear,float3(0)),float3(1.f/2.4f))-.055f,linear*12.92f,linear<=.0031308f);pixels[pos.y*info.x+pos.x]=dot(clamp(encoded,0.f,1.f),float3(.2126f,.7152f,.0722f));
}