Function recursion makes sdrc segfault

  • AKHmetgaleev ILdar

    I am trying different things in sl. And when I tried to compile shader with function recursion sdrc goes segfault.
    Does sl support function recursion?

    The function was:

    void color_recursion(
            point pp;
            vector vv;
            float prevval;
            float n,samples;
            point sphere_center;
            output color outcol;
            output float outval;
        float val = 0;
        color col = 0;
        float curval = get_density(pp,sphere_center)/samples;
        if (((outval + prevval) < 1) && (n<samples))

        outval = curval + val;
        outcol = 1;


    • Okan Arikan

      Okan Arikan - 2007-04-21

         Unfortunately, the shading language doesn't support recursion. All functions are in fact inline expanded. I think PrMan shares the same limitation.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks