• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 … 320 321 322 323 324 … 1204 Next »

Failed to compile vertex/pixel shader
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Failed to compile vertex/pixel shader
04-15-2017, 03:04 AM
#1
Nishmish Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Apr 2017
So I have been playing Dolphin for about a year but ever since last week everytime I try to start a game a box pops and says "failed to compile vertex shader." Then, when I close the box another box appears and says "failed to compile pixel shader." Here is what error message says:

#version 130
#extension GL_ARB_uniform_buffer_object : enable


#extension GL_ARB_texture_multisample : enable
#define SAMPLER_BINDING(x)


#extension GL_ARB_sample_shading : enable










#define float2 vec2
#define float3 vec3
#define float4 vec4
#define uint2 uvec2
#define uint3 uvec3
#define uint4 uvec4
#define int2 ivec2
#define int3 ivec3
#define int4 ivec4
#define frac fract
#define lerp mix
//Pixel Shader for TEV stages
//1 TEV stages, 0 texgens, 0 IND stages
int idot(int3 x, int3 y)
{
int3 tmp = x * y;
return tmp.x + tmp.y + tmp.z;
}
int idot(int4 x, int4 y)
{
int4 tmp = x * y;
return tmp.x + tmp.y + tmp.z + tmp.w;
}

int iround(float x) { return int (round(x)); }
int2 iround(float2 x) { return int2(round(x)); }
int3 iround(float3 x) { return int3(round(x)); }
int4 iround(float4 x) { return int4(round(x)); }

int itrunc(float x) { return int (trunc(x)); }
int2 itrunc(float2 x) { return int2(trunc(x)); }
int3 itrunc(float3 x) { return int3(trunc(x)); }
int4 itrunc(float4 x) { return int4(trunc(x)); }

SAMPLER_BINDING(0) uniform sampler2DArray samp[8];

layout(std140, binding = 1) uniform PSBlock {
int4 color[4];
int4 k[4];
int4 alphaRef;
float4 texdim[8];
int4 czbias[2];
int4 cindscale[2];
int4 cindmtx[6];
int4 cfogcolor;
int4 cfogi;
float4 cfogf[2];
float4 czslope;
float4 cefbscale;
};
struct VS_OUTPUT {
float4 pos;
float4 colors_0;
float4 colors_1;
float4 clipPos;
};
out vec4 ocol0;
in VertexData {
float4 pos;
float4 colors_0;
float4 colors_1;
float4 clipPos;
};
void main()
{
float4 rawpos = gl_FragCoord;
int4 c0 = color[1], c1 = color[2], c2 = color[3], prev = color[0];
int4 rastemp = int4(0, 0, 0, 0), textemp = int4(0, 0, 0, 0), konsttemp = int4(0, 0, 0, 0);
int3 comp16 = int3(1, 256, 0), comp24 = int3(1, 256, 256*256);
int alphabump=0;
int3 tevcoord=int3(0, 0, 0);
int2 wrappedcoord=int2(0,0), tempcoord=int2(0,0);
int4 tevin_a=int4(0,0,0,0),tevin_b=int4(0,0,0,0),tevin_c=int4(0,0,0,0),tevin_d=int4(0,0,0,0);

float4 col0 = colors_0;
float4 col1 = colors_1;
int2 fixpoint_uv0 = int2(0, 0);


// TEV stage 0
rastemp = iround(col0 * 255.0).rgba;
textemp = int4(255, 255, 255, 255);
tevin_a = int4(int3(0,0,0), 0)&int4(255, 255, 255, 255);
tevin_b = int4(int3(0,0,0), 0)&int4(255, 255, 255, 255);
tevin_c = int4(int3(0,0,0), 0)&int4(255, 255, 255, 255);
tevin_d = int4(rastemp.rgb, rastemp.a);
// color combine
prev.rgb = clamp((((tevin_d.rgb)) + (((((tevin_a.rgb<<8) + (tevin_b.rgb-tevin_a.rgb)*(tevin_c.rgb+(tevin_c.rgb>>7)))) + 128)>>8)), int3(0,0,0), int3(255,255,255));
// alpha combine
prev.a = clamp((((tevin_d.a)) + (((((tevin_a.a<<8) + (tevin_b.a-tevin_a.a)*(tevin_c.a+(tevin_c.a>>7)))) + 128)>>8)), 0, 255);
prev = prev & 255;
if(!( (prev.a > alphaRef.r) && (prev.a > alphaRef.g))) {
ocol0 = float4(0.0, 0.0, 0.0, 0.0);
discard;
return;
}
int zCoord = int(rawpos.z * 16777216.0);
zCoord = clamp(zCoord, 0, 0xFFFFFF);
ocol0 = float4(prev) / 255.0;
}
ERROR: 1:26: 'std140' : syntax error syntax error




If anyone knows how to fix this I would extremely appreciate if you helped me out. Big Grin
Find
Reply
04-15-2017, 03:09 AM
#2
KHg8m3r Offline
Doesn't sleep, just Dolphin and Robots
*******
Posts: 6,029
Threads: 4
Joined: Sep 2013
Does this happen in the latest 5.0 dev builds?
Find
Reply
04-15-2017, 03:30 AM
#3
Nishmish Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Apr 2017
I'm not sure about that but I am using 5.0
Find
Reply
04-15-2017, 05:09 AM
#4
KHg8m3r Offline
Doesn't sleep, just Dolphin and Robots
*******
Posts: 6,029
Threads: 4
Joined: Sep 2013
IF you go to the downloads page: https://dolphin-emu.org/download/ scroll down a bit and the dev builds will be shown. The most current as of this writing is 5.0-3362. Download it and extract to a new location (as in don't extract it to a folder where a current version of Dolphin is located)
Find
Reply
04-15-2017, 05:11 AM
#5
Nishmish Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Apr 2017
Thanks for the help! Big Grin
Find
Reply
04-15-2017, 05:13 AM
#6
Nishmish Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Apr 2017
Should I uninstall the previous one?
Find
Reply
04-15-2017, 05:17 AM
#7
envisaged0ne Offline
The Force Is Strong With This One
*****
Posts: 761
Threads: 16
Joined: Mar 2009
You can if you want. You don't have to
Windows 11 Home x64
Intel Core i7-10700
Nvidia Rtx 2060 6GB
32.0 GB DDR4 RAM
Find
Reply
04-15-2017, 05:18 AM
#8
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 9,027
Threads: 7
Joined: Oct 2014
(04-15-2017, 05:11 AM)Nishmish Wrote: Thanks for the help! Big Grin

So it works in the development version? (This is useful for us to know in case someone else has the same problem in the future.)

(04-15-2017, 05:13 AM)Nishmish Wrote: Should I uninstall the previous one?

You can do it if you want to, but you don't have to.
Find
Reply
04-15-2017, 05:25 AM
#9
Nishmish Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Apr 2017
(04-15-2017, 05:18 AM)JosJuice Wrote: So it works in the development version? (This is useful for us to know in case someone else has the same problem in the future.)

After trying, the messages still kept showing up but the sound for the game came.
Find
Reply
04-15-2017, 05:32 AM
#10
Nishmish Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Apr 2017
I was using 5.0 stable
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma