# The role of alpha in the BasicGaborShader

**URL:** <https://psychtoolbox.discourse.group/t/the-role-of-alpha-in-the-basicgaborshader/36>\
**Category:** Uncategorized\
**Created:** [March 5, 2019, 2:16am UTC](https://psychtoolbox.discourse.group/t/the-role-of-alpha-in-the-basicgaborshader/36 "2019-03-05T02:16:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daiichirokuroki](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@daiichirokuroki](https://psychtoolbox.discourse.group/u/daiichirokuroki)\
**Post date:** [March 5, 2019, 2:16am UTC](https://psychtoolbox.discourse.group/t/the-role-of-alpha-in-the-basicgaborshader/36/1 "2019-03-05T02:16:40Z")

</div>

I am studing about the BasicGaborShader.vert.txt and BasicGaborShader.frag.txt.

I have a question the role of alpha in the BasicGaborShader.

It seems that the alpha is also multiplied by mc, Contrast, and contrastPreMultiplicator.

On the other hand, as long as reading the HelloGaborArrayDemo.m and ProceduralGarboriumDemo.m, the alpha does not seem to affect the look of gabors because Screen('BlendFunction') is called respectively as follows:

Screen('BlendFunction', window, 'GL\_ONE', 'GL\_ZERO');

Screen('BlendFunction', win, GL\_ONE, GL\_ONE);

I think the alpha in the BasicGaborShader does not affect the look of gabors, is my understanding correct?

---

<div class="post-metadata">

**Author:** ![daiichirokuroki](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@daiichirokuroki](https://psychtoolbox.discourse.group/u/daiichirokuroki)\
**Post date:** [March 22, 2019, 1:58am UTC](https://psychtoolbox.discourse.group/t/the-role-of-alpha-in-the-basicgaborshader/36/2 "2019-03-22T01:58:15Z")

</div>

I am sorry for your late reply, and thank a lot.
I understood the situation where the alpha information is used.
