I hope I'm asking this question in the right place, and there are sort of
two separate issues at play - alpha calculation in GLSL shaders, and then
Over/Alpha Blend modes.

Is there support for alpha in GLSL shaders in QC?

In a vertex shader, I have the following line:

    Color = vec4(surfaceColor.rgb, 1.0);

When I change it to:

     Color = vec4(surfaceColor.rgb, 0.0);

I see an unexpected difference in the alpha content on the final textured
object in Over mode. While I do see it change from "quad" look to having
areas of obvious transparency, it looks clearly wrong. SO, I had the bright
idea to change the line...

When I change it to :

    Color = vec4(surfaceColor.rgba);

I don't see any errors, but I see no difference when I change Opacity/Alpha
value on the actual shader input for the surfaceColor. I would think that
would be the "fix". However, it doesn't work completely (the color of the
texture looks "blobby" in areas where alpha should be fading....more
smoothly?)

The only workaround I've found is to use actual alpha blending on the
renderer, in this case, by using the Kineme AlphaBlend.plugin.

Then, I see a clear difference between the two different alpha channel
values, and by setting alpha to 0 in the shader, things work as expected.

This is a sample composition; I apologize, because it's sort of
non-standard, because one would need to install the AlphaBlend.plugin for
this to render as I would expect it should in QC normally (in Over mode). I
understand if no one is thrilled to look at this because of that, but it's
not a question about a bug being caused by a 3rd party plugin (in this case,
it's the only way to see what I expect to in Over with the shader at an
alpha of 0, or with the surfaceColor.rgba line).

-George Toledo

Attachment: Shaded and Textured Particles Alpha Blend.qtz
Description: Binary data

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to