Forums > Jitter

cc.alphaglue.jxs error

October 14, 2008 | 1:19 pm

Hy all!

If I use cc.alphaglue.jxs, I get an error message:
————-
(9) : warning C7531: global type sampler2DRect requires "#extension GL_ARB_texture_rectangle : enable" before use
(27) : error C1011: cannot index a non-array value
– END GLSL INFO LOG: C:/Program Files/Cycling ’74/Max 5.0/Cycling ’74/jitter-shaders/color/cc.alphaglue.jxs –
– START GLSL INFO LOG: C:/Program Files/Cycling ’74/Max 5.0/Cycling ’74/jitter-shaders/color/cc.alphaglue.jxs –
Fragment info
————-

I added this line to the shader, but the problem remains.
Thanks!


October 14, 2008 | 2:15 pm

whats your video card? mybe it doesnt support this functions?

On Tue, Oct 14, 2008 at 3:19 PM, Adam Sipos wrote:

>
> Hy all!
>
> If I use cc.alphaglue.jxs, I get an error message:
> ————-
> (9) : warning C7531: global type sampler2DRect requires "#extension
> GL_ARB_texture_rectangle : enable" before use
> (27) : error C1011: cannot index a non-array value
> — END GLSL INFO LOG: C:/Program Files/Cycling ’74/Max 5.0/Cycling
> ’74/jitter-shaders/color/cc.alphaglue.jxs –
> — START GLSL INFO LOG: C:/Program Files/Cycling ’74/Max 5.0/Cycling
> ’74/jitter-shaders/color/cc.alphaglue.jxs –
> Fragment info
> ————-
>
> I added this line to the shader, but the problem remains.
> Thanks!
>


October 14, 2008 | 2:28 pm

I`m using PC laptop, WinXPSP2, NVidia QuadroFX 1600m.


October 14, 2008 | 4:49 pm

Hello,
It sounds like your card doesn’t like this line:
float al = bt[plane];
The ability to look up vector members as an array is not supported on all cards.
This line is where we decide which plane of the second input to use as our alpha channel. Depending on your uses, you can change this line to be a fixed value, eg:
float al = bt.a; // or bt.r,bt.g,bt.b

and/or use the lum2alpha mode of the shader. It would also be possible to use some logic in the form
float al = bt.r*float(plane==0)+bt.g*float(plane==1)+….

Having written this shader as a general purpose solution with a lot of options, I would probably recommend writing a custom alphaglue shader that does exactly what you need and nothing more, as your code will be much more concise and less prone to compatibility problems.

Best,
Andrew B.


Viewing 4 posts - 1 through 4 (of 4 total)