You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,BradLarson
I found some problem in fragment shader of LookupFilter from LookupFilter.metal。
The definition of sampler quadSampler has problem, you do not specified filter of sampler, which default value is nearest。This will cause sample value of lut texture(inputTexture2)is not precise。
It should be fixed with specified the sampler's filter property with value "linear". So, the sampler should be defined as:
Hi,BradLarson
I found some problem in fragment shader of LookupFilter from LookupFilter.metal。
The definition of sampler quadSampler has problem, you do not specified filter of sampler, which default value is nearest。This will cause sample value of lut texture(inputTexture2)is not precise。
It should be fixed with specified the sampler's filter property with value "linear". So, the sampler should be defined as:
constexpr sampler quadSampler(address::clamp_to_edge, filter::linear);
fragment half4 lookupFragment(TwoInputVertexIO fragmentInput [[stage_in]],
texture2d inputTexture [[texture(0)]],
texture2d inputTexture2 [[texture(1)]],
constant IntensityUniform& uniform [[ buffer(1) ]])
{
// constexpr sampler quadSampler;
constexpr sampler quadSampler(address::clamp_to_edge, filter::linear);
half4 base = inputTexture.sample(quadSampler, fragmentInput.textureCoordinate);
// constexpr sampler quadSampler3;
constexpr sampler quadSampler3(address::clamp_to_edge, filter::linear);
half4 newColor1 = inputTexture2.sample(quadSampler3, texPos1);
// constexpr sampler quadSampler4;
constexpr sampler quadSampler4(address::clamp_to_edge, filter::linear);
half4 newColor2 = inputTexture2.sample(quadSampler4, texPos2);
}
The text was updated successfully, but these errors were encountered: