XML Feeds

.

[jitter] alphaglue errors and alphaglue.flat rescue

yair reshef yair99 at gmail.com
Mon Mar 10 05:29:27 MDT 2008


when trying to run the cc.alphaglue.jxs example i get this repeating error.
when switching the shader to alphaglue.flat the errors are no more, the
alphaglue.flat shader is a mod Nesa made that skips all the fancy stuff.

Fragment info
-------------
(9) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(21) : warning C7531: global function texture2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(25) : error C1011: cannot index a non-array value
• error: -- END GLSL INFO LOG: C:/Program Files/Cycling '74/MaxMSP 4.6/Cycling
'74/jitter-shaders/color/cc.alphaglue.jxs --
• error: -- START GLSL INFO LOG: C:/Program Files/Cycling '74/MaxMSP
4.6/Cycling
'74/jitter-shaders/color/cc.alphaglue.jxs --

windows xp sp2
jitter 1.63b
e6400, 2gig ram
geforce 7900


here is a repost of nesa version, if your reading this from the forum you my
see breakage.

<jittershader name="alphaglue">
 <description>
 use second texture for alpha channel
 </description>
/*
I just hacked Andrews shader so that it simply took rgb
values of first texture, and alpha of second(whole shader
is pasted below), using:
gl_FragColor = vec4 (at.rgb,bt.a);

later, I needed another one for grayscale->alpha where texture B's red
channel(bt.r) is used as alpha of resulting texture:
*/

gl_FragColor = vec4 (at.rgb,bt.r);
 <param name="tex0" type="int" default="0" />
 <param name="tex1" type="int" default="1" />
 <language name="glsl" version="1.0">
 <bind param="tex0" program="fp" />
 <bind param="tex1" program="fp" />
 <program name="vp" type="vertex" source="sh.passthrudim.vp.glsl" />
 <program name="fp" type="fragment">
<![CDATA[

// Andrew Benson - andrewb at cycling74.com
//Copyright 2006 - Cycling '74

//fragment shader for applying alpha channel from second texture

//setup for 2 texture
varying vec2 texcoord0;
varying vec2 texcoord1;
uniform sampler2DRect tex0;
uniform sampler2DRect tex1;

void main()
{
 vec4 at = texture2DRect(tex0, texcoord0);
 vec4 bt = texture2DRect(tex1, texcoord1);

 // output texture
 gl_FragColor = vec4 (at.rgb,bt.a);
}
]]>
 </program>
 </language>
</jittershader>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cycling74.com/pipermail/jitter/attachments/20080310/c2e8a851/attachment.htm


More information about the jitter mailing list