C
cammodore64
Guest
I just started playing with shaders and even though my code is exactly like the simple tutorials I'm following, nothing seems to change when I run the program. I have no idea what I'm doing wrong. Any advice would be a great help.
Here's the fragment shader's code:
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main() {
vec4 base_col = v_vColor * texture2D(gm_BaseTexture, v_vTexcoord);
gl_FragColor = vec4(base_col.rgb, base_col.a * 0.5);
}
And here's the test object's draw event code:
shader_set(shader0);
draw_self();
shader_reset();
Again, very simple stuff and yet nothing seems to change when ran. The object sprite's "separate texture page" box is checked and color interpolation between pixels has been disabled.
Here's the fragment shader's code:
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main() {
vec4 base_col = v_vColor * texture2D(gm_BaseTexture, v_vTexcoord);
gl_FragColor = vec4(base_col.rgb, base_col.a * 0.5);
}
And here's the test object's draw event code:
shader_set(shader0);
draw_self();
shader_reset();
Again, very simple stuff and yet nothing seems to change when ran. The object sprite's "separate texture page" box is checked and color interpolation between pixels has been disabled.