-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fragment shader error #34
Comments
Hi Nathan,
Make sure that the program is running on the discrete graphics card
rather than the integrated one.
Cheers,
Ajay
…On Sun, 14 Jul. 2019, 8:48 am nsutemire, ***@***.***> wrote:
Hi,
I can't load my 3D volume on my laptop without getting the shader failed
error below:
`-------------Error----------------
Fragment shader failed to compile with the following errors:
ERROR: 0:85: error(#132) Syntax error: ")" parse error
ERROR: error(#273) 1 compilation errors. No code generated
-----------Shader---------------
1 : #extension GL_ARB_texture_rectangle : enable
2 : uniform sampler2D lutTex;
3 : uniform sampler2DRect dragTex;
4 : uniform int gridx;
5 : uniform int gridy;
6 : uniform int gridz;
7 : uniform int ncols;
8 : uniform int llod;
9 : uniform int lgridx;
10 : uniform int lgridy;
11 : uniform int lgridz;
12 : uniform int lncols;
13 : uniform bool opshader;
14 : uniform float tfSet;
15 : void main(void)
16 : {
17 : vec2 tc = gl_TexCoord[0].xy;
18 : int lcol = int(tc.x)/lgridx;
19 : int lrow = int(tc.y)/lgridy;
20 : float x = tc.x - float(lcol
*lgridx); 21 : float y = tc.y - float(lrow*lgridy);
22 : float z = float(lrow
*lncols + lcol); 23 : vec3 pos = vec3(x,y,z); 24 : bvec3 pless =
lessThan(pos, vec3(1.5,1.5,1.5)); 25 : bvec3 pgret = greaterThan(pos,
vec3(float(lgridx)-2.5,float(lgridy)-2.5,float(lgridz)-2.5)); 26 : if
(any(pless) || any(pgret)) 27 : { gl_FragColor = vec4(0.0,0.0,0.0,0.0);
return; } 28 : float xO = x*float(llod);
29 : float yO = y
*float(llod); 30 : float zO = z*float(llod);
31 : int alod = llod-1;
32 : vec4 fcolor = vec4(0.0,0.0,0.0,0.0);
33 : for(int xa=-alod; xa<=alod; xa++)
34 : for(int ya=-alod; ya<=alod; ya++)
35 : for(int za=-alod; za<=alod; za++)
36 : {
37 : float x = xO + xa;
38 : float y = yO + ya;
39 : float z = zO + za;
40 : int row = int(z)/ncols;
41 : int col = int(z) - row*ncols;
42 : row *= gridy;
43 : col
*= gridx; 44 : tc = vec2(float(col)+x, float(row)+y); 45 : vec2 vg; 46 :
vg.x = texture2DRect(dragTex, tc.xy).x; 47 : vec3 sample1, sample2; 48 :
float x1 = max(0.0, float(x-1.0)); 49 : sample1.x = texture2DRect(dragTex,
vec2(float(col)+x1, float(row)+y)).x; 50 : x1 = min(float(gridx-1),
float(x+1.0)); 51 : sample2.x = texture2DRect(dragTex, vec2(float(col)+x1,
float(row)+y)).x; 52 : float y1 = max(0.0, float(y-1.0)); 53 : sample1.y =
texture2DRect(dragTex, vec2(float(col)+x, float(row)+y1)).x; 54 : y1 =
min(float(gridy-1), float(y+1.0)); 55 : sample2.y = texture2DRect(dragTex,
vec2(float(col)+x, float(row)+y1)).x; 56 : int z1 = int(max(0.0,
float(z-1.0))); 57 : row = z1/ncols; 58 : col = z1 - row*ncols;
59 : row *= gridy;
60 : col
*= gridx; 61 : sample1.z = texture2DRect(dragTex, vec2(float(col)+x,
float(row)+y)).x; 62 : z1 = int(min(float(gridz-1), float(z+1.0))); 63 :
row = z1/ncols; 64 : col = z1 - row*ncols;
65 : row *= gridy;
66 : col
*= gridx; 67 : sample2.z = texture2DRect(dragTex, vec2(float(col)+x,
float(row)+y)).x; 68 : vg.y = distance(sample1, sample2); 69 : float val =
vg.x; 70 : float grad = vg.y*0.125;
71 : vg.y = tfSet + grad;
72 : if (opshader)
73 : {
74 : float alpha = texture2D(lutTex, vg.xy).a;
75 : fcolor += vec4(val, grad, alpha, 1.0);
76 : }
77 : else
78 : {
79 : vec4 clr = texture2D(lutTex, vg.xy);
80 : clr.rgb
*= clr.a; 81 : clr.a = step(0.01, clr.a); 82 : fcolor += clr; 83 : } 84 :
} 85 : gl_FragColor = fcolor/pow(2.0*(float)alod+1, 3.0);
86 : }
87 : `
I have been able to open the same volume on another PC. I'm running
drishti 2.6.5 on a windows 10 laptop with integrated amd radeon r6 graphics
card. I've updated the driver but I still get the same error.
Thanks,
Nathan
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=ABMVVLVXUR35PJC45DVLG5TP7JLVJA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7BVG5A>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMVVLVXDQPEZ3BHSURQZPDP7JLVJANCNFSM4IDDTDFA>
.
|
Hi erveryone. |
Hi everyone, |
Hi Wencke,
How did you solve the problem?
Cheers,
Ajay
…On Tue, 8 Oct. 2019, 2:16 am Wencke1, ***@***.***> wrote:
Hi everyone,
I found a solution which workes for me.
I use drishdi 2.6.4 now, and this works with my setting without a problem.
Cheers
Wencke
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=ABMVVLXMCZI2LAMTJPPBSELQNNHDVA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAQW6BA#issuecomment-539062020>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMVVLQVMJHCGP4V4ZHTIYDQNNHDVANCNFSM4IDDTDFA>
.
|
Hi Ajay,
sorry to dissappoint you, I just tryed an older version of Drishti (2.6.4 instaed of 2.6.5) and now it runs fiine.Cheers,
Wencke
|
Hi. Radeon RX 570 Series AMD Radeon Graphics Processor (0x67DF) OpenGL info: Fragment shader failed to compile with the following errors: -----------Shader--------------- 1 : #extension GL_ARB_texture_rectangle : enable |
Actually, I guess bug is in (float)alod which should be float(alod) ... and i forgot if shaders allow implicit conversions, maybe there should be 1.0 instead of 1 |
I patched executable to fix the previous error and got another one. -------------Error---------------- Fragment shader failed to compile with the following errors: -----------Shader--------------- 1 : #extension GL_ARB_texture_rectangle : enable |
Hi Tim,
Try drishti.exe from Drishti_PerpetualBeta
https://cloudstor.aarnet.edu.au/plus/s/ykqMmmikfXxHxKC
Cheers,
Ajay
…On Thu, Oct 10, 2019 at 6:31 PM Pavel Peřina ***@***.***> wrote:
I patched executable to fix the previous error and got another one.
Obviously it was never tested on AMD GPUs.
-------------Error----------------
Fragment shader failed to compile with the following errors:
ERROR: 0:22: error(#160) Cannot convert from: "float" to: "highp int"
ERROR: error(#273) 1 compilation errors. No code generated
-----------Shader---------------
1 : #extension GL_ARB_texture_rectangle : enable
2 : uniform sampler2DRect lightTex;
3 : uniform int gridx;
4 : uniform int gridy;
5 : uniform int gridz;
6 : uniform int ncols;
7 : uniform float llod;
8 : uniform int lgridx;
9 : uniform int lgridy;
10 : uniform int lncols;
11 : void main(void)
12 : {
13 : vec2 tc = gl_TexCoord[0].xy;
14 : int col = int(tc.x)/gridx;
15 : int row = int(tc.y)/gridy;
16 : float x = tc.x - float(col
*gridx); 17 : float y = tc.y - float(row*gridy);
18 : float z = float(row
*ncols + col); 19 : float xO = x*float(llod);
20 : float yO = y
*float(llod); 21 : float zO = z*float(llod);
22 : int alod = llod-1;
23 : vec4 fcolor = vec4(0.0,0.0,0.0,0.0);
24 : for(int xa=-alod; xa<=alod; xa++)
25 : for(int ya=-alod; ya<=alod; ya++)
26 : for(int za=-alod; za<=alod; za++)
27 : {
28 : float x = xO + xa;
29 : float y = yO + ya;
30 : float z = zO + za;
31 : int lrow = int(z)/lncols;
32 : int lcol = int(z) - lrow*lncols;
33 : lrow *= lgridy;
34 : lcol
*= lgridx; 35 : vec2 ltc = vec2(float(lcol)+x, float(lrow)+y); 36 : fcolor
+= vec4(texture2DRect(lightTex, ltc).rgb, 1.0); 37 : } 38 : gl_FragColor =
fcolor/pow(2.0*float(alod)+1, 3.0);
39 : }
40 :
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=ABMVVLSSL6MLFAAOZ244P5DQN3K4DA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA3F7DI#issuecomment-540434317>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMVVLVPTCFM7VXHEPF4XRTQN3K4DANCNFSM4IDDTDFA>
.
|
Hi Ajay.
That executable file in cloud root directory that is few hours old works
(at least basic features of default and hi-res renderers).
Thank you.
Pavel
…On Mon, Oct 14, 2019 at 3:02 AM AjayLimaye ***@***.***> wrote:
Hi Tim,
Try drishti.exe from Drishti_PerpetualBeta
https://cloudstor.aarnet.edu.au/plus/s/ykqMmmikfXxHxKC
Cheers,
Ajay
On Thu, Oct 10, 2019 at 6:31 PM Pavel Peřina ***@***.***>
wrote:
> I patched executable to fix the previous error and got another one.
> Obviously it was never tested on AMD GPUs.
>
> -------------Error----------------
>
> Fragment shader failed to compile with the following errors:
> ERROR: 0:22: error(#160) Cannot convert from: "float" to: "highp int"
> ERROR: error(#273) 1 compilation errors. No code generated
>
> -----------Shader---------------
>
> 1 : #extension GL_ARB_texture_rectangle : enable
> 2 : uniform sampler2DRect lightTex;
> 3 : uniform int gridx;
> 4 : uniform int gridy;
> 5 : uniform int gridz;
> 6 : uniform int ncols;
> 7 : uniform float llod;
> 8 : uniform int lgridx;
> 9 : uniform int lgridy;
> 10 : uniform int lncols;
> 11 : void main(void)
> 12 : {
> 13 : vec2 tc = gl_TexCoord[0].xy;
> 14 : int col = int(tc.x)/gridx;
> 15 : int row = int(tc.y)/gridy;
> 16 : float x = tc.x - float(col
> *gridx); 17 : float y = tc.y - float(row*gridy);
> 18 : float z = float(row
> *ncols + col); 19 : float xO = x*float(llod);
> 20 : float yO = y
> *float(llod); 21 : float zO = z*float(llod);
> 22 : int alod = llod-1;
> 23 : vec4 fcolor = vec4(0.0,0.0,0.0,0.0);
> 24 : for(int xa=-alod; xa<=alod; xa++)
> 25 : for(int ya=-alod; ya<=alod; ya++)
> 26 : for(int za=-alod; za<=alod; za++)
> 27 : {
> 28 : float x = xO + xa;
> 29 : float y = yO + ya;
> 30 : float z = zO + za;
> 31 : int lrow = int(z)/lncols;
> 32 : int lcol = int(z) - lrow*lncols;
> 33 : lrow *= lgridy;
> 34 : lcol
>
>
>
> *= lgridx; 35 : vec2 ltc = vec2(float(lcol)+x, float(lrow)+y); 36 :
fcolor
> += vec4(texture2DRect(lightTex, ltc).rgb, 1.0); 37 : } 38 : gl_FragColor
=
> fcolor/pow(2.0*float(alod)+1, 3.0);
> 39 : }
> 40 :
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#34?email_source=notifications&email_token=ABMVVLSSL6MLFAAOZ244P5DQN3K4DA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA3F7DI#issuecomment-540434317
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ABMVVLVPTCFM7VXHEPF4XRTQN3K4DANCNFSM4IDDTDFA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=ADE3EUWOLBR46DZ3NX75JWDQOPALNA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBDEURY#issuecomment-541477447>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADE3EUTXDO2ER4JMEPR2SSTQOPALNANCNFSM4IDDTDFA>
.
|
Problem is we don't have any machines with AMD card (which apply stricter
rules) to test. Hence these errors keep popping up.
Cheers,
Ajay
On Tue, Oct 15, 2019 at 1:08 AM Pavel Peřina <notifications@github.com>
wrote:
… Hi Ajay.
That executable file in cloud root directory that is few hours old works
(at least basic features of default and hi-res renderers).
Thank you.
Pavel
On Mon, Oct 14, 2019 at 3:02 AM AjayLimaye ***@***.***>
wrote:
> Hi Tim,
> Try drishti.exe from Drishti_PerpetualBeta
> https://cloudstor.aarnet.edu.au/plus/s/ykqMmmikfXxHxKC
>
> Cheers,
> Ajay
>
> On Thu, Oct 10, 2019 at 6:31 PM Pavel Peřina ***@***.***>
> wrote:
>
> > I patched executable to fix the previous error and got another one.
> > Obviously it was never tested on AMD GPUs.
> >
> > -------------Error----------------
> >
> > Fragment shader failed to compile with the following errors:
> > ERROR: 0:22: error(#160) Cannot convert from: "float" to: "highp int"
> > ERROR: error(#273) 1 compilation errors. No code generated
> >
> > -----------Shader---------------
> >
> > 1 : #extension GL_ARB_texture_rectangle : enable
> > 2 : uniform sampler2DRect lightTex;
> > 3 : uniform int gridx;
> > 4 : uniform int gridy;
> > 5 : uniform int gridz;
> > 6 : uniform int ncols;
> > 7 : uniform float llod;
> > 8 : uniform int lgridx;
> > 9 : uniform int lgridy;
> > 10 : uniform int lncols;
> > 11 : void main(void)
> > 12 : {
> > 13 : vec2 tc = gl_TexCoord[0].xy;
> > 14 : int col = int(tc.x)/gridx;
> > 15 : int row = int(tc.y)/gridy;
> > 16 : float x = tc.x - float(col
> > *gridx); 17 : float y = tc.y - float(row*gridy);
> > 18 : float z = float(row
> > *ncols + col); 19 : float xO = x*float(llod);
> > 20 : float yO = y
> > *float(llod); 21 : float zO = z*float(llod);
> > 22 : int alod = llod-1;
> > 23 : vec4 fcolor = vec4(0.0,0.0,0.0,0.0);
> > 24 : for(int xa=-alod; xa<=alod; xa++)
> > 25 : for(int ya=-alod; ya<=alod; ya++)
> > 26 : for(int za=-alod; za<=alod; za++)
> > 27 : {
> > 28 : float x = xO + xa;
> > 29 : float y = yO + ya;
> > 30 : float z = zO + za;
> > 31 : int lrow = int(z)/lncols;
> > 32 : int lcol = int(z) - lrow*lncols;
> > 33 : lrow *= lgridy;
> > 34 : lcol
> >
> >
> >
> > *= lgridx; 35 : vec2 ltc = vec2(float(lcol)+x, float(lrow)+y); 36 :
> fcolor
> > += vec4(texture2DRect(lightTex, ltc).rgb, 1.0); 37 : } 38 :
gl_FragColor
> =
> > fcolor/pow(2.0*float(alod)+1, 3.0);
> > 39 : }
> > 40 :
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <
>
#34?email_source=notifications&email_token=ABMVVLSSL6MLFAAOZ244P5DQN3K4DA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA3F7DI#issuecomment-540434317
> >,
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/ABMVVLVPTCFM7VXHEPF4XRTQN3K4DANCNFSM4IDDTDFA
> >
> > .
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#34?email_source=notifications&email_token=ADE3EUWOLBR46DZ3NX75JWDQOPALNA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBDEURY#issuecomment-541477447
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ADE3EUTXDO2ER4JMEPR2SSTQOPALNANCNFSM4IDDTDFA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=ABMVVLRNGWHZJGRZ3BFI5V3QOR4OBA5CNFSM4IDDTDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBE3AUY#issuecomment-541700179>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMVVLT54RXH5RWOUOWXT2TQOR4OBANCNFSM4IDDTDFA>
.
|
Hi,
I can't load my 3D volume on my laptop without getting the shader failed error below:
`-------------Error----------------
Fragment shader failed to compile with the following errors:
ERROR: 0:85: error(#132) Syntax error: ")" parse error
ERROR: error(#273) 1 compilation errors. No code generated
-----------Shader---------------
1 : #extension GL_ARB_texture_rectangle : enable
2 : uniform sampler2D lutTex;
3 : uniform sampler2DRect dragTex;
4 : uniform int gridx;
5 : uniform int gridy;
6 : uniform int gridz;
7 : uniform int ncols;
8 : uniform int llod;
9 : uniform int lgridx;
10 : uniform int lgridy;
11 : uniform int lgridz;
12 : uniform int lncols;
13 : uniform bool opshader;
14 : uniform float tfSet;
15 : void main(void)
16 : {
17 : vec2 tc = gl_TexCoord[0].xy;
18 : int lcol = int(tc.x)/lgridx;
19 : int lrow = int(tc.y)/lgridy;
20 : float x = tc.x - float(lcollgridx);
21 : float y = tc.y - float(lrowlgridy);
22 : float z = float(lrowlncols + lcol);
23 : vec3 pos = vec3(x,y,z);
24 : bvec3 pless = lessThan(pos, vec3(1.5,1.5,1.5));
25 : bvec3 pgret = greaterThan(pos, vec3(float(lgridx)-2.5,float(lgridy)-2.5,float(lgridz)-2.5));
26 : if (any(pless) || any(pgret))
27 : { gl_FragColor = vec4(0.0,0.0,0.0,0.0); return; }
28 : float xO = xfloat(llod);
29 : float yO = yfloat(llod);
30 : float zO = zfloat(llod);
31 : int alod = llod-1;
32 : vec4 fcolor = vec4(0.0,0.0,0.0,0.0);
33 : for(int xa=-alod; xa<=alod; xa++)
34 : for(int ya=-alod; ya<=alod; ya++)
35 : for(int za=-alod; za<=alod; za++)
36 : {
37 : float x = xO + xa;
38 : float y = yO + ya;
39 : float z = zO + za;
40 : int row = int(z)/ncols;
41 : int col = int(z) - row*ncols;
42 : row *= gridy;
43 : col = gridx;
44 : tc = vec2(float(col)+x, float(row)+y);
45 : vec2 vg;
46 : vg.x = texture2DRect(dragTex, tc.xy).x;
47 : vec3 sample1, sample2;
48 : float x1 = max(0.0, float(x-1.0));
49 : sample1.x = texture2DRect(dragTex, vec2(float(col)+x1, float(row)+y)).x;
50 : x1 = min(float(gridx-1), float(x+1.0));
51 : sample2.x = texture2DRect(dragTex, vec2(float(col)+x1, float(row)+y)).x;
52 : float y1 = max(0.0, float(y-1.0));
53 : sample1.y = texture2DRect(dragTex, vec2(float(col)+x, float(row)+y1)).x;
54 : y1 = min(float(gridy-1), float(y+1.0));
55 : sample2.y = texture2DRect(dragTex, vec2(float(col)+x, float(row)+y1)).x;
56 : int z1 = int(max(0.0, float(z-1.0)));
57 : row = z1/ncols;
58 : col = z1 - rowncols;
59 : row *= gridy;
60 : col = gridx;
61 : sample1.z = texture2DRect(dragTex, vec2(float(col)+x, float(row)+y)).x;
62 : z1 = int(min(float(gridz-1), float(z+1.0)));
63 : row = z1/ncols;
64 : col = z1 - rowncols;
65 : row *= gridy;
66 : col = gridx;
67 : sample2.z = texture2DRect(dragTex, vec2(float(col)+x, float(row)+y)).x;
68 : vg.y = distance(sample1, sample2);
69 : float val = vg.x;
70 : float grad = vg.y0.125;
71 : vg.y = tfSet + grad;
72 : if (opshader)
73 : {
74 : float alpha = texture2D(lutTex, vg.xy).a;
75 : fcolor += vec4(val, grad, alpha, 1.0);
76 : }
77 : else
78 : {
79 : vec4 clr = texture2D(lutTex, vg.xy);
80 : clr.rgb = clr.a;
81 : clr.a = step(0.01, clr.a);
82 : fcolor += clr;
83 : }
84 : }
85 : gl_FragColor = fcolor/pow(2.0(float)alod+1, 3.0);
86 : }
87 : `
I have been able to open the same volume on another PC. I'm running drishti 2.6.5 on a windows 10 laptop with integrated amd radeon r6 graphics card. I've updated the driver but I still get the same error.
Thanks,
Nathan
The text was updated successfully, but these errors were encountered: