What what
What what

Reputation: 527

Translucent White Looks Gray (OpenGL ES 2.0)

I am using Ray Wenderlich's tutorial on GLKit.
My game involves bubbles and things inside of them. To
achieve this effect I have the Background of the Bubble
and another image to create the shine.

What I want it to look like

enter image description here

My problem is when I do this it turns out to look like
an ugly grey. I'm at a bit of a loss here so
any help would be appreciated.

What it looks like

enter image description here

Upvotes: 2

Views: 662

Answers (2)

What what
What what

Reputation: 527

I figured it out what I just changed glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
to glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

Upvotes: 1

Michael Slade
Michael Slade

Reputation: 13877

Wild guess: you need to "brighten" the colors you are blending, by adding some grey to them, i.e. something to the effect of outcol = incol + vec4(0.2,0.2,0.2,0) in your shader (or outside your shader if that is more convenient)

Upvotes: 0

Related Questions