S
skeptile
Guest
About a week ago I had to perform a factory reset on my PC and thus had to reinstall GMS and import my project files from a backup drive. Everything seemed to be working fine, until I tried to compile an .exe. Whenever I try to run the .exe, I get the following error message:
This is especially strange, because 1) I've been using this exact shader for months and have never had any issues with it, whether running the game from the IDE or from a compiled executable, and 2) the crash only occurs when running from the executable; when I run the game from the IDE, it runs without any issue.
Even stranger, the vertex shader is literally just the default passthrough shader.
If it might help, here's the fragment shader:
(I know this shader is pretty messy, as I'm still new to writing shaders, but the point is that it has always run without any issues in the past.)
Thanks for any advice you may have.
Code:
___________________________________________
############################################################################################
FATAL ERROR in Vertex Shader compilation
ShaderName: shader_outline
D3DXCompile failed - result
at gml_Script_draw_sprite_outlined_ext
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_draw_sprite_outlined_ext (line 0)
gml_Object_obj_menu_Draw_0
Even stranger, the vertex shader is literally just the default passthrough shader.
If it might help, here's the fragment shader:
Code:
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform float pixelH;
uniform float pixelW;
uniform float pixelA;
uniform float outlineR;
uniform float outlineG;
uniform float outlineB;
void main()
{
vec2 offsetx;
offsetx.x = pixelW;
vec2 offsety;
offsety.y = pixelH;
float alpha = texture2D( gm_BaseTexture, v_vTexcoord ).a;
int done = 0;
if (texture2D( gm_BaseTexture, v_vTexcoord + offsetx ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord + offsety ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord - offsetx ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord - offsety ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord + offsetx + offsety ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord + offsetx - offsety ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord - offsetx + offsety ).a >= float(0.1))
done = 1;
else if (texture2D( gm_BaseTexture, v_vTexcoord - offsetx - offsety ).a >= float(0.1))
done = 1;
gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
if (done == 1 && alpha < float(0.1)) {
alpha = float(1);
gl_FragColor = vec4(outlineR, outlineG, outlineB, 1.0);
}
gl_FragColor.a = float(done) * pixelA * alpha;
}
Thanks for any advice you may have.