• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Invalid shader (incompatible type for this target?)

Vivid

Member
So apparently all my shaders have broke and I'm just picking up the pieces.
I just recently did a factory reset on my PC and am reinstalling GM again (+2.3)

I have installed the latest versions for my graphics cards drivers and latest version of DirectX

Yet every time I run a shader I get this message:
Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in Vertex Shader compilation

ShaderName: shd_pal_swapper


Invalid shader

at gml_Script_pal_swap_set (line 7) - shader_set(Pal_Shader);
############################################################################################
gml_Script_pal_swap_set (line 7)
gml_Object_Fallen_Draw_0 (line 10) - pal_swap_set(pal_spr,current_pal,false);//open palette shader

There is also this in the Output of the IDE DirectX11: Using hardware device
Code:
Invalid shader (is it marked as incompatible type for this target?) "shd_test":
Shd_test is just a simple passthrough shader
What should I do?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Have you checked the shader to ensure it hasn't been set to some type other than GLSL ES in the shader options? Right click on the shader then mouse over the "shader options" to see which type is selected.
 

adamrdrew

Member
Did you ever figure this out? I reinstalled my system, trying to run my game that was working before the reinstall, and getting "Invalid shader (is it marked as incompatible type for this target?)" - nothing in the project changed.
 

ondydev

Member
same issue here except I've been occasionally getting a pop up window saying MSVCR110.dll was not found. have reinstalled both VSC++ 2012 and 2015-2019 and still no luck. I'm running on a clean install of Windows 10 with GMS 2.3.5(.589)

my shaders are all GLSL ES and worked on the same project file on my old hard drive. ever since I reinstalled and updated GM not a single shader on any project has worked.

any ideas?
 
Last edited:

FoxyOfJungle

Kazan Games
same issue here except I've been occasionally getting a pop up window saying MSVCR110.dll was not found. have reinstalled both VSC++ 2012 and 2015-2019 and still no luck. I'm running on a clean install of Windows 10 with GMS 2.3.5+

my shaders are all GLSL ES and worked on the same project file on my old hard drive. ever since I reinstalled and updated GM not a single shader on any project has worked.

any ideas?
I don't know if it can help, but you can try downloading Driver Booster 8 for driver updates...
Did you download these files from Visual C++ specifically? That's what I found from Microsoft's help page and others websites.
Also, try the Microsoft Visual C++ Redistributable. Install all versions if possible.
 

ondydev

Member
I don't know if it can help, but you can try downloading Driver Booster 8 for driver updates...
Did you download these files from Visual C++ specifically? That's what I found from Microsoft's help page and others websites.
Also, try the Microsoft Visual C++ Redistributable. Install all versions if possible.
yeah I've tried that VS 2012 Update 4 a few times, reinstalled and all. I have several versions of C++ redistributable already and I'm about to try more - I had like 6 or 7 on my last OS probably for similar (gamemaker) reasons.

could updating to 2.3.6 potentially resolve this?
EDIT: 2.3.6.464 is giving the same error, all shaders show in compiler as invalid. and crash the game if called. tried reinstalling visual C++ redistributable 2015-2019 again and still no luck.
 
Last edited:

FoxyOfJungle

Kazan Games
yeah I've tried that VS 2012 Update 4 a few times, reinstalled and all. I have several versions of C++ redistributable already and I'm about to try more - I had like 6 or 7 on my last OS probably for similar (gamemaker) reasons.

could updating to 2.3.6 potentially resolve this?
You can try, so far it's working on my computer... 🤔
 

ondydev

Member
I have microsoft visual C++ 2010, 2012, 2013, 2015-2019 and I manually replaced MSVCR110.dll but I'm still getting "invalid shader" and a crash every time a shader is called. my shaders are all set to GLSL ES and never had any problems until I switched to my new SSD and reinstalled windows.

super frustrating too. no clue what the problem is anymore. i've reinstalled almost every visual c++ redistributable, and reinstalled gamemaker too. when this first happened I thought it was related to directx and opengl but I updated those too and still nothing.

UPDATE: got it working - I needed the x86 install of Visual C++ 2012 Update 4. I had assumed I only needed the one built for my system's architecture and only installed the x64 version. If anyone is reading this and has the same problem, make sure you install both!

found that info here: https://answers.microsoft.com/en-us...computer/625ec0c1-e281-43ad-ab40-172035945943
 
Last edited:
Top