kimotokanon Posted November 22, 2013 Posted November 22, 2013 Hello! I am trying to make a gradient shader that fades from a white colored gradient texture to a gray one.Image 1: white to transparent/black that uses wave sin as fade effect with frequency 0.1.Image 2: gray to transparent/black that also uses wave sin, but with phase 0.5, so that these 2 images will switch between showing. The problem is that when I try to make a gray version, it usually doesnt appear, or it acts like a white version with more transparency.So in short I cannot make the gray one work properly.. Since all my attempts have failed.. idk if it's worth posting the shader ... Please help.
mrwonko Posted November 22, 2013 Posted November 22, 2013 Just multiply the gradient from white to black with a wave that goes from 0.5 to 1 and back (I believe that means base = 0.5, amplitude = 0.5?), I guess. (Multiply should be blendFunc GL_DST_COLOR GL_ZERO, if memory serves.)
kimotokanon Posted November 23, 2013 Author Posted November 23, 2013 It's working, actually! Thanks for the help
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now