• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Shaders Help with setting up alpha to 0 in just some pixels?

T

theraje3

Guest
So, Im having a really hard time trying to make this happen, so I just decided to ask for help :3.

  • What I want to achieve:
I have a large rectangular sprite, and I want to make it invisible X pixels from de left to the right. I already have the X value set up with an uniform.​
  • Why I'm suffering:
I can't get just X number of pixels from the left to the right to make them invisible (and only those) I only get the full sprite or noone...
  • What I think I need:
I need the selection of those pixels, I imagine using a vec2 with the .x value and modifing or making a new v_vTexcoord.
Any ideas of how can I do that? thx for reading and sorry for english!! :D
 
T

theraje3

Guest
woah thanks a lot... searched for a similar function but I didnt find it so I tryied make it in the shader.... you just made my life much easier. thx!!

(anyway if someone knows how to do that in shader aswell would be great)
 
Top