Help needed with iOS core image

Discussion in 'iOS Development' started by Arpit Arora, Feb 4, 2018.

  1. Arpit Arora

    Arpit Arora Newbie

    Hello, I am stuck on a very weird issue.

    I have the following very simple kernel, but everytime I run it, I get the "unrecognized selector sent to instance" error.

    1. kernel vec4 test (sampler source_image)
    2. {
    3. vec2 a = vec2(100.0, 200.0);
    4. vec4 pixValue = sample(source_image, a);
    5. return pixValue;
    6. }
    If I add samplerTransform, I still get the same error.
    1. kernel vec4 test (sampler source_image)
    2. {
    3. vec2 a = vec2(100.0, 200.0);
    4. vec4 pixValue = sample(source_image, samplerTransform(source_image, a));
    5. return pixValue;
    6. }
    However, if I change the kernel to the following, everything works fine and I get returned the source image. This goes to show that the rest of my objective-c code is working just fine. So the issue must be in the kernel codes in the above samples somewhere.
    1. kernel vec4 test (sampler source_image)
    2. {
    3. vec2 a = vec2(100.0, 200.0);
    4. vec4 pixValue = sample(source_image, samplerCoord(source_image));
    5. return pixValue;
    6. }
    Any idea what the issue might be?
     
  2. Anna Jones

    Anna Jones Newbie

    Hi,
    I'd be happy to assist you.
    Sent you PM.
    Regards,
    AJ
     

Share This Page