glsl/jit.gl.shader runs on intel but not on ppc

batchku's icon

hello,
i have a patch that i'm testing with a MacBook Pro (ATI X1600) and a G5 Quad (GeForce 6600).

the following patch+shader works on my intel, but not on the G5. the G5 reports no errors (except the warning of an unused variable) but only shows black, where as on the macbook pro, i see the textures/masks/overlays and so on.....

as far as i can tell, the GeForce 6600 should be compatible with everything i'm doing. i've succeeded with other shaders as well as all the examples i've tried. i'd also think that if it were that sort of problem, i'd get an error....

thanks.

Max Patch
Copy patch and select New From Clipboard in Max.

---------patch:

--------- shader: name it "wave-masks-08.jxs"

    Burn composite operator
    

        texture dimensions
        amp 0
        amp 0
        time 0
        freq 0
    

        amp 0
        time 1
        freq 1
    

        amp 0
        time 1
        freq 1
    

Andrew Benson's icon

Most likely, this is due to the compiled shader being too big for the
GPU on the G5. I would recommend trying to move the texcoord math over
to the vertex program where possible, and passing these values as
varying variables. Also, the golden rule of GLSL is "vectorize
everything". Any calculation that you can collapse into a vec4 will be
way more efficient, since that is the optimized format. Try to use the
built-in GLSL functions such as mix(),dot(),step(),smoothstep(), etc.
wherever possible.
Cheers,
Andrew B.

batchku's icon

hi andrew,
thank for the advice. that's helpful.
i'm very curious about the "vectorize everything" advice;
does that mean when i'm multiplying a vec4 by a float, i should vectorize the float? or if i have certain variables that funciton as counters or coefficients and so on, i.e. floats, should i use vec4's even for them?

yours
a