Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualLorenzoGatti

Posted 25 January 2013 - 10:35 AM

As always, complete code samples would be better:
  • What do you put into Colors[]? How is it animated?
  • What's the point of GL_ALPHA_TEST? Don't you want to draw arbitrary stuff first, and an increasingly opaque rectangle over whatever you are fading out last, unconditionally? Every fragment should be a*fade colour + (1-a)*stuff colour, with a (Colors[4] for you) increasing from 0 to 1 and ignoring the alpha value of the fading stuff.
  • When do you draw the stuff you are fading out, and in which OpenGL state? I only see pFade->Draw(), which I suppose contains only the rectangle in the second snippet.

#2LorenzoGatti

Posted 25 January 2013 - 10:35 AM

As always, complete code samples would be better:
  • What do you put into Colors[]? How is it animated?
  • What's the point of GL_ALPHA_TEST? Don't you want to draw arbitrary stuff first, and an increasingly opaque rectangle over whatever you are fading out last, unconditionally? Every fragment should be a*fade colour + (1-a)*stuff colour, with a (Colors[4] for you) increasing from 0 to 1 and ignoring the alpha value of the fading stuff.
  • When do you draw the stuff you are fading out, and in which OpenGL state? I only see pFade->Draw(), which I suppose contains only the rectangle in the second snippet.

#1LorenzoGatti

Posted 25 January 2013 - 02:29 AM

As always, complete code samples would be better:

  • What do you put into Colors[]? How is it animated?
  • What's the point of GL_ALPHA_TEST? Don't you want to draw arbitrary stuff first, and an increasingly opaque rectangle over whatever you are fading out last, unconditionally? Every fragment should be a*fade colour + (1-a) stuff colour, with a (Colors[4] for you) increasing from 0 to 1 and ignoring the alpha value of the fading stuff.
  • When do you draw the stuff you are fading out, and in which OpenGL state? I only see pFade->Draw(), which I suppose contains only the rectangle in the second snippet.

PARTNERS