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

Discussion GMS2 Shaders Not Supported?

Status
Not open for further replies.
T

TheMatrixHasMe

Guest
Hey guys, I purchased GMS2 yesterday and started programming a shader today. When I went to test it I got an error saying that the shader was invalid. So I created a shader is compiled check like so:
Code:
if (shader_is_compiled(shd_fireball)){
    shader_set(shd_fireball);
    draw_sprite_ext(sprite_index,image_index,x,y,1,1,direction,c_white,1);
    shader_reset();
}
Anyhow, the fireball doesn't get drawn which means the shader is not compiled. The shader is just a default pass through shader for testing. I never had this problem with Studio 1 so is this because of directx 11 or whatever revision they changed to? Does that mean my graphics card doesn't process the shaders that GMS2 is kicking out?

Update: Okay, it looks like there is an issue with Shaders. I ran the YoYo dungeon demo product that GMS2 comes with and it gave me an invalid shader error:
Code:
___________________________________________
############################################################################################
FATAL ERROR in Vertex Shader compilation
ShaderName: sh_silhouette_shader

Invalid shader
 at gml_Script_OT_Draw_Silhouettes (line 11) - shader_set(sh_silhouette_shader);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_OT_Draw_Silhouettes (line 11)
called from - gml_Object_oController_Silhouettes_Draw_0 (line 2) - OT_Draw_Silhouettes();
 
Last edited by a moderator:
  • Sad
Reactions: Mut

rwkay

GameMaker Staff
GameMaker Dev.
OK did you create an HLSL9 shader or a GLES shader???

We no longer support HLSL9 (as we are now on DX11) I would recommend that you use a GLES shader for a simple pass through

Russell
 
T

TheMatrixHasMe

Guest
@rwkay I created a default shader but I also used the YoYo Dungeon demo and ran it and it instantly gave the same error with the shaders coded for that project. I checked and they are both GLSL ES default shader types.
 

rwkay

GameMaker Staff
GameMaker Dev.
We are not seeing any shader problems ourselves and it is something that should be supported I would be curious to see the Compile Output from an unsuccessful run as it should show any errors in there...

Russell
 
T

TheMatrixHasMe

Guest
@rwkay
Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in Vertex Shader compilation

ShaderName: sh_light_shader


Invalid shader

 at gml_Object_oController_Lighting_Draw_0 (line 45) - shader_set(sh_light_shader);
############################################################################################
That's from the Output of the demo project (YoYo Dungeon)

I looked in the compile errors tab and there were no errors but you want the compile output so maybe that was what I just gave you above.

My graphics card is GeForce GTX 580 so maybe it's just old at this point or isn't up to GMS2's standards for the shaders? I lose track of where my graphics card is at but it's probably old by now.
 

Mike

nobody important
GMC Elder
1st... I'd check your license has upgraded properly. Logout and log back in again.

Second. Can you create a shader yourself? (outside of the demo).

As long as your running windows vista and up, I'm pretty sure it should work. The shader isn't complicated, so as long as it's there and compiles.....
 

Mike

nobody important
GMC Elder
Oh...the "lite" version of the demo is a stripped back version and doesn't use shaders - you could also play with that.
 
T

TheMatrixHasMe

Guest
@Mike

-My license updgraded properly because I was able to download the YoYo Dungeon with the Shaders and do other things like import my project from GMS1.x

-I can create a shader but even creating a simple pass through shader that is a default shader and does nothing but render the image as it would have been without a shader, still same error.

-My Windows OS is 7.

-FYI I've gone back to the Lite version for study as that was what I was wanting to use the non-lite version with the shaders for. So thanks for the tip and yes I have done that.

At this point I'm just assuming there is something buggy with my graphics card and give you guys the benefit of the doubt. Although it's very perplexing because shaders work for me on GMS1.x. As of now I'm resigning myself to no shaders until I get a new graphics card which will likely be a couple months at the minimum unfortunately.
 

Mike

nobody important
GMC Elder
Actually, it's not the same as GMS1 as it uses DX9, GMS2 uses DX11. In order to test on GMS1 you'd have to compile for windows 8 as that was the only target we used DX11 for.
 
T

TheMatrixHasMe

Guest
Actually, it's not the same as GMS1 as it uses DX9, GMS2 uses DX11. In order to test on GMS1 you'd have to compile for windows 8 as that was the only target we used DX11 for.
That was actually my thought too, why I suspect my graphics card, the dx9 vs ds11 difference. However, I thought my graphics card was dx11 compatible. Unless it's faulty, which leads me back to my current suspicion lol
 
Status
Not open for further replies.
Top