Hi,
I have problem after updating to Nuke 7. Using following code causes Fragment shader error.

const char* Falloff2Op::gpuEngine_decl() const
{
        char sText[1024];
        memset(sText, 0, 1024*sizeof(char));
        sprintf(sText, "uniform float $$fXFall = 0.123f;\n");
        return sText;
}

Similar code works fine

const char* Falloff2Op::gpuEngine_decl() const
{
        char sText[1024];
        memset(sText, 0, 1024*sizeof(char));
        return "uniform float $$fXFall = 0.123;\n";
}

I cannot use second version since 0.123 will be replaced with value calculated inside _validate.

gpuEngine_body doen't use fXFall (just for testing purposes).

const char* Falloff2Op::gpuEngine_body() const
{
        return
                "float $$lum = OUT.r * 0.2125 + OUT.g * 0.7154 + OUT.b * 
0.0721;\n"
                "OUT = vec4($$lum, $$lum, $$lum, OUT.a);\n";
}

I'm compiling with visual 2010 for Nuke 7.0v6 64bit. This code works in 6.3v9. How can I solve this? I don't see any changes in shaders since Nuke 6.

regards
Adam
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to