• 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!

"Invalid Shader" Error Message

cowsbian

Member
Hello! I've been trying to find a solution to this issue for a couple of hours now. Every thread I found seemed to come to the conclusion of reinstalling direct_x or something from Microsoft (I forgot what it was called already). Anyways, all I'm doing is trying to make a fragment shader that turns a sprite white. However, my game keeps crashing and giving me an error telling me that it's an "invalid shader." I've tried the solutions I mentioned before and I'm at a complete loss. What should I do?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Have you tried other shaders and found that they work or not? Did you write the shader yourself? Have you ensured that the shader is the correct type (Open GL ES)? Can you share the shader code here so we can look at it?
 

cowsbian

Member
Have you tried other shaders and found that they work or not? Did you write the shader yourself? Have you ensured that the shader is the correct type (Open GL ES)? Can you share the shader code here so we can look at it?
Sorry about the late response, I actually managed to find my issue. While redownloading the C++ Redistributable, I assumed I only needed the 64x versions since I'm running a 64x system. However, I found that I needed to download the 32x version as well. Doing this seemed to fix the issue.
 

Rafael_Lima

Member
Ok, I have this same issue. Just came from a fresh Windows 10 install. An older executable which is live on Steam works, but if I try to run the current code or even build a new executable, I get this exact same error. No shader is working, all of them get this error, they are set the right type, I've tried instaling C++ Redistributable for both X86 and X64, installed newest Direct X ... nothing works, keep getting this error.

At least I can keep the current executable on Steam, but I need to update it to a new version and I won't do it while It keeps giving me this error.
 

rIKmAN

Member
I've tried instaling C++ Redistributable for both X86 and X64
There are a lot more than 1 C++ Redistributables, try using the All-In-One Installer which which installs multiple versions of them without having to install each one manually: https://www.techpowerup.com/download/visual-c-redistributable-runtime-package-all-in-one/
The download includes the VC_Redist runtime packages for Visual C++ 2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, 2021 and 2022. Both 32-bit and 64-bit are supported. The files included are the English language version.
As you've just re-installed Windows 10 it's likely you have none of them (or just the one you installed) so this should hopefully fix your issue.
 

Rafael_Lima

Member
Ok, this fixed it. Thank you!

Also the executable I built before installing all of them is NOT working,but any new one I build works. Good to know that the client doesn't have to worry, is just the developer machine that has to be properly updated :)
 
Top