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


    Sep 04 2006 | 2:32 pm
    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.
    ---------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

    • Sep 04 2006 | 3:29 pm
      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.
    • Sep 04 2006 | 3:48 pm
      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