alphamask shader

Jan 26, 2010 at 1:48am

alphamask shader

Kinda dumb question, but is there a shader to create alpha masks?

Like this:

– Pasted Max Patch, click to expand. –

The lack of a shader reference is killing me!

#48023
Jan 26, 2010 at 4:44am

Max5/Cycling ’74/jitter-shaders/color/cc.alphaglue.jxs
Max5/Cycling ’74/jitter-shaders/composite/co.alphablend.jxs
are the two to check out. alphaglue will create an alpha channel based on luminance.
alphablend works similar to jit.alphablend (expects the source textures to have an alpha channel).

Max5/examples/jitter-examples/render/slab-helpers/color/cc.alphaglue.jxs-help.maxpat
Max5/examples/jitter-examples/render/slab/jit.gl.slab-composite.maxpat
should will help you out with these shaders.

#172702
Jan 27, 2010 at 1:22am

Thanks, Rob. Alphaglue does the trick without even adjusting the parameters!

As far as references, I wasn’t talking about help files as most of the shaders are very self explanatory. I just meant some kind of list that tells you what each one does. I know cv.jit has an object guide and Peter Elsea put together a reference for regular jitter effects, with screenshots even. I never understood why there wasn’t one for the shaders. The slab compositing example serves some of that purpose and I’m sure I’ll find more like that if I poke around in the examples folder.

#172703
Jan 29, 2010 at 1:12am

Is there a way to get alphaglue to work in jit.gl.shader, similar to sending the same texture to both inlets of a slab? I’m trying to implement this in the poly~ abstraction you recommended in my other thread and using slabs is much more annoying.

#172704
Jan 31, 2010 at 9:52pm

Still having a ton of trouble with this. Here is the patch:

– Pasted Max Patch, click to expand. –

And the poly~ abstraction:

– Pasted Max Patch, click to expand. –
#172705
Feb 9, 2010 at 12:34am

Still struggling. It seems the shaders aren’t attaching now.

Here is the most recent version:

– Pasted Max Patch, click to expand. –

– Pasted Max Patch, click to expand. –
#172706
Feb 9, 2010 at 2:26am

not really sure what you are trying to do, but see if this patch helps you out.
basically, we use the alphaglue shader to create an alpha channel based on luminance, and we composite our videoplanes using blend_enable 1 (which requires depth_enable 0 to work properly).

– Pasted Max Patch, click to expand. –
#172707
Feb 9, 2010 at 11:46pm

I actually realized that Andrew Benson’s lumagate shader from his “Your First Shader” article does exactly what I need, so I substituted that for the alphaglue. I am trying to run both that and a radial blur from jit.gl.shader, rather than slabs, for ease in the poly~ abstraction. Unfortunately, it appears that neither of my shaders is binding correctly.

#172708

You must be logged in to reply to this topic.