Dolphin, the GameCube and Wii emulator - Forums
Failed to compile vertex shader! - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Support (https://forums.dolphin-emu.org/Forum-support)
+--- Thread: Failed to compile vertex shader! (/Thread-failed-to-compile-vertex-shader--30884)



Failed to compile vertex shader! - octojay - 06-04-2013

I'm getting this about 60% of the way through Paper Mario GCN when entering certain areas:

\Dolphin\memory(53,13): error X3018: invalid subscript 'C4'



Here's the dump:


//Vertex Shader: comp:a400,
typedef struct { float4 T0, T1, T2; float4 N0, N1, N2; } s_cpnmtx;
typedef struct { float4 t; } FLT4;
typedef struct { FLT4 T[24]; } s_ctexmtx;
typedef struct { FLT4 T[64]; } s_ctrmtx;
typedef struct { FLT4 T[32]; } s_cnmtx;
typedef struct { FLT4 T[64]; } s_cpostmtx;
typedef struct { float4 col; float4 cosatt; float4 distatt; float4 pos; float4 dir; } Light;
typedef struct { Light lights[8]; } s_clights;
typedef struct { float4 C0, C1, C2, C3; } s_cmtrl;
typedef struct { float4 T0, T1, T2, T3; } s_cproj;
struct VS_OUTPUT {
float4 pos : POSITION;
float4 colors_0 : COLOR0;
float4 colors_1 : COLOR1;
float3 tex0 : TEXCOORD0;
float4 clipPos : TEXCOORD1;
};
uniform s_ctrmtx ctrmtx : register(c78);
uniform s_ctexmtx ctexmtx : register(c54);
uniform s_cnmtx cnmtx : register(c142);
uniform s_cpnmtx cpnmtx : register(c0);
uniform s_cpostmtx cpostmtx : register(c174);
uniform s_clights clights : register(c14);
uniform s_cmtrl cmtrl : register(c10);
uniform s_cproj cproj : register(c6);
uniform float4 cDepth : register(c238);
VS_OUTPUT main(
float3 rawnorm0 : NORMAL0,
float4 color0 : COLOR0,
float2 tex0 : TEXCOORD0,
float4 rawpos : POSITION) {
VS_OUTPUT o;
float4 pos = float4(dot(cpnmtx.T0, rawpos), dot(cpnmtx.T1, rawpos), dot(cpnmtx.T2, rawpos), 1.0f);
float3 _norm0 = normalize(float3(dot(cpnmtx.N0.xyz, rawnorm0), dot(cpnmtx.N1.xyz, rawnorm0), dot(cpnmtx.N2.xyz, rawnorm0)));
o.pos = float4(dot(cproj.T0, pos), dot(cproj.T1, pos), dot(cproj.T2, pos), dot(cproj.T3, pos));
float4 mat, lacc;
float3 ldir, h;
float dist, dist2, attn;
{
mat = color0;
lacc = float4(1.0f, 1.0f, 1.0f, 1.0f);
lacc.w = 1.0f;
o.colors_0 = mat * saturate(lacc);
}
{
mat = color0;
lacc = float4(1.0f, 1.0f, 1.0f, 1.0f);
lacc.w = 1.0f;
o.colors_1 = mat * saturate(lacc);
}
{
mat = color2;
lacc = float4(1.0f, 1.0f, 1.0f, 1.0f);
lacc.w = 1.0f;
o.colors_2 = mat * saturate(lacc);
}
float4 coord = float4(0.0f, 0.0f, 1.0f, 1.0f);
{
coord = float4(0.0f, 0.0f, 1.0f, 1.0f);
coord = float4(tex0.x, tex0.y, 1.0f, 1.0f);
o.tex0.xyz = float3(dot(coord, ctexmtx.T[0].t), dot(coord, ctexmtx.T[1].t), 1);
float4 P0 = cpostmtx.T[61].t;
float4 P1 = cpostmtx.T[62].t;
float4 P2 = cpostmtx.T[63].t;
o.tex0.xyz = float3(dot(P0.xyz, o.tex0.xyz) + P0.w, dot(P1.xyz, o.tex0.xyz) + P1.w, dot(P2.xyz, o.tex0.xyz) + P2.w);
}
o.clipPos = float4(pos.x,pos.y,o.pos.z,o.pos.w);
o.pos.z = cDepth.x * o.pos.w + o.pos.z * cDepth.y;
o.pos = o.pos + float4(cDepth.z, cDepth.w, 0.f, 0.f);
return o;
}



Any help would be appreciated.

-Benjamin

EDIT-- SYSTEM SPECS:


EVGA GeForce GTX 670 GPU
EVGA GeForce GTX 460 SE GPU (PhysX)
AMD Phenom II x4 965 BE CPU
ASUS Sabertooth 990FX R2.0 MB
Crucial M4 64GB SSD (OS)
Crucial M4 256GB SSD (Steam)
Western Digital Black 1TB HDD
Samsung F4 2TB HDD (x2)
G.SKILL Ripjaws X 16GB (4x4GB) DDR3 1333 RAM


RE: Failed to compile vertex shader! - haddockd - 06-04-2013

Did you perform a search for vertex shader on the forums? I got around 75 results or so. I recommend it.

To give you a head start, I think it means your graphics card isnt up to snuff for Dolphin. This can happen if perhaps the integrated GPU is selected on the Graphics config or maybe your drivers arent legit/up to date.


RE: Failed to compile vertex shader! - octojay - 06-04-2013

I can run any game at max settings and get close to 120fps, so I sort of doubt it's lack of horsepower on my part. I don't have an integrated gpu, two physical cards. The correct card is selected and I keep all of my drivers completely up to date.

Apologies for not doing more searching I guess. I just followed the directions in the error message.

-Benjamin


RE: Failed to compile vertex shader! - ExtremeDude2 - 06-04-2013

(06-04-2013, 06:04 AM)octojay Wrote: I can run any game at max settings and get close to 120fps

In dolphin? Imposible. In PC games? Perhaps.


RE: Failed to compile vertex shader! - octojay - 06-04-2013

(06-04-2013, 06:09 AM)ExtremeDude2 Wrote:
(06-04-2013, 06:04 AM)octojay Wrote: I can run any game at max settings and get close to 120fps

In dolphin? Imposible. In PC games? Perhaps.
Correct. I was merely pointing out that my problem certainly isn't lack of horsepower.

-Benjamin


RE: Failed to compile vertex shader! - LordVador - 06-04-2013

Try something more recent than the build you're using. It's more than 1000 builds old. Latest builds.

Also what ExtremeDude2 meant is that your rig is excellent for PC games but not necessarily for Dolphin. You'll get aware of that if you try to play some demanding games. However Paper Mario isn't really demanding so it shouldn't be the problem here


RE: Failed to compile vertex shader! - octojay - 06-04-2013

(06-04-2013, 07:18 AM)LordVador Wrote: Try something more recent than the build you're using. It's more than 1000 builds old. Latest builds.

Also what ExtremeDude2 meant is that your rig is excellent for PC games but not necessarily for Dolphin. You'll get aware of that if you try to play some demanding games. However Paper Mario isn't really demanding so it shouldn't be the problem here
Thank you. The latest dev release seems not to be throwing me this issue.

-Benjamin