A couple of more thoughts about Alpha Channels


A note about alpha shenanigans, the vignette example I posted, and the "clod cousin" before it.

#1 - It pains me that I didn't turn the alpha channel to black when I uploaded the clod cousin a week or so before.

#2 - It's simpler from a code standpoint to just do:

gl_FragColor.a = 1.0;

...right at the end of the code, than weed through the code and change it in multiple places.

That said, I felt like it made more sense to approach that particular vignette example the way I did. It seemed like there was no reason for the main to be operating on vec4 instead of vec3. I haven't checked out to see what the compiler does, as far as "how does the difference affect the compiled machine code, and which is more optimized?", which would probably be a worthwhile test, though the performance gain either way is so trivial as to likely be close to unmeasurable.