xygthop3
Member
I've been using the same basic HLSL9 shader since 2013 and its worked great with GMS 1.x, are HLSL9 shaders currently implemented with GMS2?
I've right-clicked on the shader and set the shader type to HLSL 9. Target platform is set to Windows - VM.
GMS2 error: (GMS1.x was much better with error reports with HLSL btw )
The interesting part of this error is the line: Invalid shader (is it marked as incompatible type for this target?) "shader0":
Vertex:
Fragment:
Whats making me feel like HLSL 9 hasn't been implemented yet is that there is almost no syntax highlighting of the shader code (compared to GMS 1.x)
I've right-clicked on the shader and set the shader type to HLSL 9. Target platform is set to Windows - VM.
GMS2 error: (GMS1.x was much better with error reports with HLSL btw )
The interesting part of this error is the line: Invalid shader (is it marked as incompatible type for this target?) "shader0":
And the shader code I've always used and still use without issue in GMS1DirectX11: Using hardware device
Invalid shader (is it marked as incompatible type for this target?) "shader0":
Total memory used = 2773946(0x002a53ba) bytes
ERROR!!! :: ############################################################################################
FATAL ERROR in Vertex Shader compilation
ShaderName: shader0
Invalid shader
at gml_Object_object0_Draw_0 (line 1) - shader_set(shader0);
############################################################################################
Vertex:
Code:
//
// Simple passthrough vertex shader (HLSL9)
//
struct a2v { //in from attributes to vertex
float4 Position : POSITION;
float4 Color : COLOR0;
float2 Texcoord : TEXCOORD0;
};
struct v2p { //out from vertex to pixel
float4 Position : POSITION;
float4 Color : COLOR0;
float2 Texcoord : TEXCOORD0;
};
void main(in a2v IN, out v2p OUT)
{
OUT.Position = mul(gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION], IN.Position);
OUT.Color = IN.Color;
OUT.Texcoord = IN.Texcoord;
}
Code:
//
// Simple passthrough fragment shader (HLSL9)
//
struct v2p { //in from vertex to pixel
float4 Color : COLOR0;
float2 Texcoord : TEXCOORD0;
};
struct p2s { //out from pixel to screen
float4 Color : COLOR;
};
void main(in v2p IN, out p2s OUT)
{
OUT.Color = IN.Color * tex2D(gm_BaseTexture, IN.Texcoord);
}