Been banging my head against this one for a couple of days so I figured it's time to buck up and ask -
I've got a simple shader that creates an alpha-blended circle (soft circle goes from param-defined color in the center to transparent at the edges).
I'm using that shader on a slab and getting the color param just fine but no alpha. I was able to confirm the alpha is calculated properly by testing the shader with calculated alpha on all channels (commented line in the shader below).
I know it's something simple in my implementation that's preventing alpha from being used but I'm at a loss where to look next.
Any help would be appreciated.
varying vec4 vertexPosition;
uniform vec4 circleColor;
uniform float intensity;
uniform float circleSizeModifier;
vec4 center = vec4(0.0,0.0,0.0,0.0);
vec4 position = vec4(vertexPosition.x, vertexPosition.y * .75, vertexPosition.z, vertexPosition.a);
float alpha = distance(position.xy, center.xy);
alpha = alpha * circleSizeModifier;
alpha = pow(alpha , intensity);
alpha = pow(alpha ,-1.0);
gl_FragColor = vec4(circleColor.x, circleColor.y, circleColor.z, alpha * circleColor.a);
// gl_FragColor = vec4(alpha, alpha, alpha, alpha * circleColor.a);
VERT SHADERvarying vec4 vertexPosition;
gl_Position = ftransform();
vertexPosition = gl_Position;