DjennyFloro
Member
Greetings everyone,
I am at the conceptual stage of my shader (not coded since I am trying to lay out how the shader should work). The goal is to animate the construction of a building.
Here's what I want to achieve:
step 1: the first row of pixels is some kind of neon blue glowing (1px large, perhaps 2 px large).
step 2: the first row of pixels is the sprite's pixels with an alpha of 0.1, the second row of pixels is neon blue glowing.
step 3: the first row of pixels is the sprite's pixels with an alpha of 0.2, the second row of pixels is the sprite's one with 0.1 and the third row of pixels is neon blue.
....
and so on, until I've reached the last row of pixels and it's of alpha 1.
I understand that I should have at least have a variable passed onto the shader that keeps track of the time and step of the construction I'm in. What I don't get, is where should I keep track of which row I'm in, and if I should make 2 shaders (one for the glowing blue bar that goes upward as the sprite's built, one for the sprite being built).
I've been looking at several tutorials, but the concept of this "row by row" construction seems absent, and I'm a bit at loss as to how this would go on.
Thanks to anyone who'll take the time to read and/or answer this thread.
Djenny Floro.
I am at the conceptual stage of my shader (not coded since I am trying to lay out how the shader should work). The goal is to animate the construction of a building.
Here's what I want to achieve:
step 1: the first row of pixels is some kind of neon blue glowing (1px large, perhaps 2 px large).
step 2: the first row of pixels is the sprite's pixels with an alpha of 0.1, the second row of pixels is neon blue glowing.
step 3: the first row of pixels is the sprite's pixels with an alpha of 0.2, the second row of pixels is the sprite's one with 0.1 and the third row of pixels is neon blue.
....
and so on, until I've reached the last row of pixels and it's of alpha 1.
I understand that I should have at least have a variable passed onto the shader that keeps track of the time and step of the construction I'm in. What I don't get, is where should I keep track of which row I'm in, and if I should make 2 shaders (one for the glowing blue bar that goes upward as the sprite's built, one for the sprite being built).
I've been looking at several tutorials, but the concept of this "row by row" construction seems absent, and I'm a bit at loss as to how this would go on.
Thanks to anyone who'll take the time to read and/or answer this thread.
Djenny Floro.