Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Xcode and effects shaders

edited April 2013 in Questions Posts: 666

I have just taken a project from my ipad that was using the Effects:Ripple shader as:


When I try to compile this, it works, but when I run it, I get the error:

Bad argument #1 to 'shader' (Shader not found)

In my xcode project, the Resources/ShaderPacks has an Effects.shaderpack with Ripple.shader, and 3 files.

Why would this fail?



  • edited April 2013 Posts: 666

    Figured this out - the ios simulator doesn't handle it. Wen I built for the ipad, it runs fine,

    Next issue: has anyone had a problem with spriteList()? When I use it to get a list of images from my documents folder, it comes back with no elements, even though my xcode project has 50 images in it.

    Forgot to mention: readimage() works, I can load an image by explicitly stating the file name.

  • Posts: 666


  • Posts: 2,051

    @aciolino, I am having issues with saveImage() but not with pulling up a list of sprites

  • SimeonSimeon Admin Mod
    Posts: 5,759

    I'll look into this @aciolino, thanks for reporting it.

  • Posts: 2,161

    Back to the first problem, I got that error message when running my app on my iPad but launched from Xcode. I didn't get it in the simulator, and I didn't get it when I'd actually installed the app.

  • SimeonSimeon Admin Mod
    Posts: 5,759

    @Andrew_Stacey sometimes that can happen if you have an old version of the app on your iPad with a different set of data, and then you add shader folders to one of the shader packs. (Or spritepack folders to SpritePacks/).

    Xcode is a bit buggy when it comes to folder references (the blue groups in the project navigator). It often won't understand that it needs to copy everything to your iPad again — even though the contents of the folder reference have changed. Sometimes you need to clean your build before knows to copy everything.

  • Posts: 666

    I tend to do a full clean every few builds for that reason - all modern compilers have compile bugs :)

  • SimeonSimeon Admin Mod
    Posts: 5,759

    @aciolino to be overly pedantic :) — it's not a compiler bug (LLVM/Clang is very good). It's Xcode the IDE not packaging resources correctly.

  • Posts: 666

    You're right - I was grouping the IDE and the compiler. Yes, modern IDE's have bugs :) especially with resource management.

Sign In or Register to comment.