cc.alphaglue.jxs error

Oct 14, 2008 at 1:19pm

cc.alphaglue.jxs error

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!

#40333
Oct 14, 2008 at 2:15pm

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!
>

#142556
Oct 14, 2008 at 2:28pm

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

#142557
Oct 14, 2008 at 4:49pm

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.

#142558

You must be logged in to reply to this topic.