A confusing issue with the CIKernel's sample() method. Assigning the result of samplerTransform() to a variable and then using it in the sample() method breaks everything.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This works. | |
kernel vec4 simpleFilter(sampler p) | |
{ | |
vec2 dc = destCoord(); | |
return sample(p, samplerTransform(p, dc)); | |
} | |
// This does not. It produces [0, 0, 0, 255] for the first 255 pixels and then [0, 0, 0, 0] thereafter. | |
kernel vec4 simpleFilter(sampler p) | |
{ | |
vec2 dc = destCoord(); | |
vec2 tc = samplerTransform(p, dc); | |
return sample(p, tc); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seeing the same, many years later :))))) 😭