jujubs
Member
So I followed this tutorial right here to learn how to change my sprites' colors using shaders:
It all seemed simple enough, and indeed, I managed to add some color to my game sprites without much hassle. However, the method used in the video also changes how transparency behaves. My player sprite ended up looking like this whenever I apply some color using the shader:
I thought this would be simple enough to fix. Based on how the shader works, I put an intercept that checks if the alpha is bigger than 0 before it changes its color. But then, this happens:
I've no idea what's wrong with the syntax. Even the compiler error just spits out zilch between apostrophes, and contrary to what it says, there is no additional info in the Compile window.
I'm a noob when it comes to GLSL and shaders in general, but I know a bit of C and I can't see anything wrong there
I even tried using curly brackets, but it just puts the syntax error right in its line. What am I doing wrong?
It all seemed simple enough, and indeed, I managed to add some color to my game sprites without much hassle. However, the method used in the video also changes how transparency behaves. My player sprite ended up looking like this whenever I apply some color using the shader:
I thought this would be simple enough to fix. Based on how the shader works, I put an intercept that checks if the alpha is bigger than 0 before it changes its color. But then, this happens:
I've no idea what's wrong with the syntax. Even the compiler error just spits out zilch between apostrophes, and contrary to what it says, there is no additional info in the Compile window.
I'm a noob when it comes to GLSL and shaders in general, but I know a bit of C and I can't see anything wrong there
I even tried using curly brackets, but it just puts the syntax error right in its line. What am I doing wrong?