{"action":"created","issue":{"url":"https://api.github.com/repos/xqemu/xqemu/issues/90","repository_url":"https://api.github.com/repos/xqemu/xqemu","labels_url":"https://api.github.com/repos/xqemu/xqemu/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/xqemu/xqemu/issues/90/comments","events_url":"https://api.github.com/repos/xqemu/xqemu/issues/90/events","html_url":"https://github.com/xqemu/xqemu/issues/90","id":343553782,"node_id":"MDU6SXNzdWUzNDM1NTM3ODI=","number":90,"title":"Type mismatch: Type of _O;v_vtx;inv_w different between shaders.","user":{"login":"dracc","id":1279635,"node_id":"MDQ6VXNlcjEyNzk2MzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1279635?v=4","gravatar_id":"","url":"https://api.github.com/users/dracc","html_url":"https://github.com/dracc","followers_url":"https://api.github.com/users/dracc/followers","following_url":"https://api.github.com/users/dracc/following{/other_user}","gists_url":"https://api.github.com/users/dracc/gists{/gist_id}","starred_url":"https://api.github.com/users/dracc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dracc/subscriptions","organizations_url":"https://api.github.com/users/dracc/orgs","repos_url":"https://api.github.com/users/dracc/repos","events_url":"https://api.github.com/users/dracc/events{/privacy}","received_events_url":"https://api.github.com/users/dracc/received_events","type":"User","site_admin":false},"labels":[{"id":973283978,"node_id":"MDU6TGFiZWw5NzMyODM5Nzg=","url":"https://api.github.com/repos/xqemu/xqemu/labels/area:video","name":"area:video","color":"fbca04","default":false},{"id":1049541663,"node_id":"MDU6TGFiZWwxMDQ5NTQxNjYz","url":"https://api.github.com/repos/xqemu/xqemu/labels/bug","name":"bug","color":"ee0000","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-23T09:23:47Z","updated_at":"2018-10-08T22:33:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"On Intel HD 4400, the PSXCare Superdisk fails with a shader linking error.\r\nSame ISO works fine on my AMD R9 290X.\r\n\r\nMachine specs:\r\nDell Latitude E7240\r\nIntel HD 4400\r\nDriver version: 20.19.15.4835 (Latest Dell driver, the ones from intel.com doesn't install)\r\nWindows 10 Pro 1709 x86_64\r\nIntel Core i5 4210u\r\nXQEMU revision: 592b4dbbf7\r\n\r\n<details><summary>Console output:</summary>\r\n\r\n```\r\ndsp_init\r\ndsp_init\r\nac97: invalid bm_index(3) in voice_set_active\r\nac97: invalid bm_index(3) in voice_set_active\r\nac97: invalid bm_index(3) in voice_set_active\r\nac97: invalid bm_index(3) in voice_set_active\r\nac97: invalid bm_index(3) in voice_set_active\r\nac97: invalid bm_index(3) in voice_set_active\r\ntm_read_data: addr=0x4c cmd=0x08 n=0\r\ntm_read_data: addr=0x4c cmd=0x00 n=0\r\ntm_read_data: addr=0x4c cmd=0x01 n=0\r\ntm_read_data: addr=0x4c cmd=0x10 n=0\r\nnv2a: shader linking failed: Type mismatch: Type of _O;v_vtx;inv_w different between shaders.\r\nType mismatch: Type of _O;v_vtx;D0 different between shaders.\r\nType mismatch: Type of _O;v_vtx;D1 different between shaders.\r\nType mismatch: Type of _O;v_vtx;B0 different between shaders.\r\nType mismatch: Type of _O;v_vtx;B1 different between shaders.\r\nType mismatch: Type of _O;v_vtx;Fog different between shaders.\r\nType mismatch: Type of _O;v_vtx;T0 different between shaders.\r\nType mismatch: Type of _O;v_vtx;T1 different between shaders.\r\nType mismatch: Type of _O;v_vtx;T2 different between shaders.\r\nType mismatch: Type of _O;v_vtx;T3 different between shaders.\r\nOut of resource error.\r\n```\r\n</details>"},"comment":{"url":"https://api.github.com/repos/xqemu/xqemu/issues/comments/428000326","html_url":"https://github.com/xqemu/xqemu/issues/90#issuecomment-428000326","issue_url":"https://api.github.com/repos/xqemu/xqemu/issues/90","id":428000326,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODAwMDMyNg==","user":{"login":"JayFoxRox","id":360330,"node_id":"MDQ6VXNlcjM2MDMzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/360330?v=4","gravatar_id":"","url":"https://api.github.com/users/JayFoxRox","html_url":"https://github.com/JayFoxRox","followers_url":"https://api.github.com/users/JayFoxRox/followers","following_url":"https://api.github.com/users/JayFoxRox/following{/other_user}","gists_url":"https://api.github.com/users/JayFoxRox/gists{/gist_id}","starred_url":"https://api.github.com/users/JayFoxRox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JayFoxRox/subscriptions","organizations_url":"https://api.github.com/users/JayFoxRox/orgs","repos_url":"https://api.github.com/users/JayFoxRox/repos","events_url":"https://api.github.com/users/JayFoxRox/events{/privacy}","received_events_url":"https://api.github.com/users/JayFoxRox/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T22:33:15Z","updated_at":"2018-10-08T22:33:15Z","author_association":"MEMBER","body":"This is a more complete log by @ernegien \r\n\r\nI don't remember which GPU.\r\nI don't remember game / scene.\r\n\r\nI'll add more information and formatting in the future (as soon as I get feedback by @ernegien and find time to update)\r\n\r\nThe log is just a dump of each shader in order of appearance (VS, GS, FS for each).\r\nThe first shaders work fine the later ones cause the crash.\r\n\r\nI've removed the VS header for readability and replaced it with `// VS stuff`.\r\n\r\n<details><summary>(Click here to fold / unfold)</summary><br>\r\n\r\n```glsl\r\n// VS stuff\r\n\r\nvoid main() {\r\n  /* Slot 0: 0x00000000 0x00200E1B 0x0836106C 0x2E200FF8 */\r\n  MOV(R2,xyz, v7);\r\n\r\n  /* Slot 1: 0x00000000 0x00A0061B 0x2436106C 0x28300FF8 */\r\n  DP3(R3,x, R2, v3);\r\n\r\n  /* Slot 2: 0x00000000 0x00A0041B 0x2436106C 0x24300FF8 */\r\n  DP3(R3,y, R2, v2);\r\n\r\n  /* Slot 3: 0x00000000 0x00A0021B 0x2436106C 0x22300FF8 */\r\n  DP3(R3,z, R2, v1);\r\n\r\n  /* Slot 4: 0x00000000 0x02A0101B 0x2436486C 0x2140C85C */\r\n  DP3(R4,w, R2, R2);\r\n  MOV(oT2,xy, v8);\r\n\r\n  /* Slot 5: 0x00000000 0x00C0201B 0x0836186C 0x20704800 */\r\n  DPH(oPos,y, v0, c[1]);\r\n\r\n  /* Slot 6: 0x00000000 0x08C0001B 0x08361BFD 0x10118800 */\r\n  DPH(oPos,x, v0, c[0]);\r\n  RSQ(R1,w, R4.w);\r\n\r\n  /* Slot 7: 0x00000000 0x00C0401B 0x0836186C 0x20702800 */\r\n  DPH(oPos,z, v0, c[2]);\r\n\r\n  /* Slot 8: 0x00000000 0x00C0601B 0x0836186C 0x20701800 */\r\n  DPH(oPos,w, v0, c[3]);\r\n\r\n  /* Slot 9: 0x00000000 0x02C1A81B 0x0836186D 0x1850181C */\r\n  DPH(R5,x, v4, c[13]);\r\n  MOV(oD0,w, R4);\r\n\r\n  /* Slot 10: 0x00000000 0x00C1C81B 0x0836186C 0x24500FF8 */\r\n  DPH(R5,y, v4, c[14]);\r\n\r\n  /* Slot 11: 0x00000000 0x004000FF 0x1436686C 0x2070E860 */\r\n  MUL(oT3,xyz, R1.w, R3);\r\n\r\n  /* Slot 12: 0x00000000 0x0041801B 0x542A186C 0x2070C848 */\r\n  MUL(oT0,xy, R5, c[12].xy);\r\n\r\n  /* Slot 13: 0x00000000 0x0041801B 0x5554186C 0x2070C850 */\r\n  MUL(oT1,xy, R5, c[12].z);\r\n\r\n  /* Slot 14: 0x00000000 0x0022401B 0x0C36106C 0x2E600FF8 */\r\n  MOV(R6,xyz, c[18]);\r\n\r\n  /* Slot 15: 0x00000000 0x00A1E21B 0x0836186C 0x21700FF8 */\r\n  DP3(R7,w, v1, c[15]);\r\n\r\n  /* Slot 16: 0x00000000 0x00A2021B 0x0836186C 0x21B00FF8 */\r\n  DP3(R11,w, v1, c[16]);\r\n\r\n  /* Slot 17: 0x00000000 0x0041E0FF 0x75FE186C 0x21800FF8 */\r\n  MUL(R8,w, R7.w, c[15].w);\r\n\r\n  /* Slot 18: 0x00000000 0x014008FF 0x8554106C 0x21900FF8 */\r\n  MAX(R9,w, R8.w, v4.z);\r\n\r\n  /* Slot 19: 0x00000000 0x008220FF 0x9436186D 0x9EA00FF8 */\r\n  MAD(R10,xyz, R9.w, c[17], R6);\r\n\r\n  /* Slot 20: 0x00000000 0x004200FF 0xB5FE186C 0x21000FF8 */\r\n  MUL(R0,w, R11.w, c[16].w);\r\n\r\n  /* Slot 21: 0x00000000 0x014008FF 0x0554106C 0x21200FF8 */\r\n  MAX(R2,w, R0.w, v4.z);\r\n\r\n  /* Slot 22: 0x00000000 0x008220FF 0x2436186E 0x9070E818 */\r\n  MAD(oD0,xyz, R2.w, c[17], R10);\r\n\r\n  /* Slot 23: 0x00000000 0x0647401B 0xC4361BFF 0x1078E800 */\r\n  MUL(oPos,xyz, R12, c[58]);\r\n  RCC(R1,x, R12.w);\r\n\r\n  /* Slot 24: 0x00000000 0x0087601B 0xC400286C 0x3070E801 */\r\n  MAD(oPos,xyz, R12, R1.x, c[59]);\r\n\r\n  if (oPos.w == 0.0 || isinf(oPos.w)) {\r\n    vtx.inv_w = 1.0;\r\n  } else {\r\n    vtx.inv_w = 1.0 / oPos.w;\r\n  }\r\n  oPos.x = 2.0 * (oPos.x - surfaceSize.x * 0.5) / surfaceSize.x;\r\n  oPos.y = -2.0 * (oPos.y - surfaceSize.y * 0.5) / surfaceSize.y;\r\n  if (clipRange.y != clipRange.x) {\r\n    oPos.z = (oPos.z - 0.5 * (clipRange.x + clipRange.y)) / (0.5 * (clipRange.y - clipRange.x));\r\n  }\r\n  if (oPos.w < 0.0) {\r\n    oPos.xyz *= oPos.w;\r\n  } else {\r\n    oPos.w = 1.0;\r\n  }\r\n  float fogDistance = oFog.x;\r\n  float fogFactor = fogParam[0] + fogDistance * fogParam[1];\r\n  fogFactor -= 1.0;\r\n  oFog.xyzw = vec4(fogFactor);\r\n\r\n  vtx.D0 = clamp(oD0, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.D1 = clamp(oD1, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.B0 = clamp(oB0, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.B1 = clamp(oB1, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.Fog = oFog.x * vtx.inv_w;\r\n  vtx.T0 = oT0 * vtx.inv_w;\r\n  vtx.T1 = oT1 * vtx.inv_w;\r\n  vtx.T2 = oT2 * vtx.inv_w;\r\n  vtx.T3 = oT3 * vtx.inv_w;\r\n  gl_Position = oPos;\r\n  gl_PointSize = oPts.x;\r\n\r\n}\r\n\r\n```\r\n\r\n```glsl\r\n#version 330\r\n\r\nstruct VertexData {\r\n  float inv_w;\r\n  vec4 D0;\r\n  vec4 D1;\r\n  vec4 B0;\r\n  vec4 B1;\r\n  float Fog;\r\n  vec4 T0;\r\n  vec4 T1;\r\n  vec4 T2;\r\n  vec4 T3;\r\n};\r\nnoperspective in VertexData g_vtx;\r\n#define vtx g_vtx\r\n\r\nout vec4 fragColor;\r\n\r\nuniform vec4 fogColor;\r\nuniform ivec4 clipRegion[1];\r\nuniform sampler2D texSamp0;\r\nuniform sampler2D texSamp2;\r\nuniform samplerCube texSamp3;\r\nuniform vec4 c_0_0;\r\nuniform vec4 c_8_0;\r\nuniform float alphaRef;\r\nvoid main() {\r\n/*  Window-clip (Inclusive) */\r\nbool clipContained = false;\r\nfor (int i = 0; i < 1; i++) {\r\n  bvec4 clipTest = bvec4(lessThan(gl_FragCoord.xy, clipRegion[i].xy),\r\n                         greaterThan(gl_FragCoord.xy, clipRegion[i].zw));\r\n  if (!any(clipTest)) {\r\n    clipContained = true;\r\n    break;\r\n  }\r\n}\r\nif (!clipContained) { discard; }\r\nvec4 pD0 = vtx.D0 / vtx.inv_w;\r\nvec4 pD1 = vtx.D1 / vtx.inv_w;\r\nvec4 pB0 = vtx.B0 / vtx.inv_w;\r\nvec4 pB1 = vtx.B1 / vtx.inv_w;\r\nvec4 pFog = vec4(fogColor.rgb, clamp(vtx.Fog / vtx.inv_w, 0.0, 1.0));\r\nvec4 pT0 = vtx.T0 / vtx.inv_w;\r\nvec4 pT1 = vtx.T1 / vtx.inv_w;\r\nvec4 pT2 = vtx.T2 / vtx.inv_w;\r\nvec4 pT3 = vtx.T3 / vtx.inv_w;\r\n\r\nvec4 v0 = pD0;\r\nvec4 v1 = pD1;\r\nvec4 t0 = textureProj(texSamp0, pT0.xyw);\r\nvec4 t1 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 t2 = textureProj(texSamp2, pT2.xyw);\r\nvec4 t3 = texture(texSamp3, pT3.xyz / pT3.w);\r\nvec4 r0;\r\nr0.a = t0.a;\r\n// Stage 0\r\nt0.rgb = vec3(dot((2.0 * t0.rgb - 1.0), (2.0 * t3.rgb - 1.0)));\r\nr0.rgb = vec3((t2.rgb * c_0_0.rgb));\r\n// Stage 1\r\nr0.a = ((((1.0 - v0.a) * (1.0 - 0.0)) + (v0.a * t0.b)));\r\n// Final Combiner\r\nr0.rgb = r0.rgb + mix(vec3(0.0), vec3((r0.a * c_8_0.rgb)), vec3(t2.rgb));\r\nr0.a = vec3(t0.a).x;\r\nif (!(r0.a > alphaRef)) discard;\r\nfragColor = r0;\r\n}\r\n```\r\n\r\n```glsl\r\n// VS stuff\r\n\r\nvoid main() {\r\n  /* Slot 0: 0x00000000 0x00C3801B 0x0836186C 0x20708800 */\r\n  DPH(oPos,x, v0, c[28]);\r\n\r\n  /* Slot 1: 0x00000000 0x00C3A01B 0x0836186C 0x20704800 */\r\n  DPH(oPos,y, v0, c[29]);\r\n\r\n  /* Slot 2: 0x00000000 0x00C3C01B 0x0836186C 0x20702800 */\r\n  DPH(oPos,z, v0, c[30]);\r\n\r\n  /* Slot 3: 0x00000000 0x00C3E01B 0x0836186C 0x20701800 */\r\n  DPH(oPos,w, v0, c[31]);\r\n\r\n  /* Slot 4: 0x00000000 0x0020081B 0x0836106C 0x2070C848 */\r\n  MOV(oT0,xy, v4);\r\n\r\n  /* Slot 5: 0x00000000 0x0020121B 0x0836106C 0x2070F818 */\r\n  MOV(oD0,xyzw, v9);\r\n\r\n  /* Slot 6: 0x00000000 0x00201400 0x0836106C 0x20701820 */\r\n  MOV(oD1,w, v10.x);\r\n\r\n  /* Slot 7: 0x00000000 0x0647401B 0xC4361BFF 0x1078E800 */\r\n  MUL(oPos,xyz, R12, c[58]);\r\n  RCC(R1,x, R12.w);\r\n\r\n  /* Slot 8: 0x00000000 0x0087601B 0xC400286C 0x3070E801 */\r\n  MAD(oPos,xyz, R12, R1.x, c[59]);\r\n\r\n  if (oPos.w == 0.0 || isinf(oPos.w)) {\r\n    vtx.inv_w = 1.0;\r\n  } else {\r\n    vtx.inv_w = 1.0 / oPos.w;\r\n  }\r\n  oPos.x = 2.0 * (oPos.x - surfaceSize.x * 0.5) / surfaceSize.x;\r\n  oPos.y = -2.0 * (oPos.y - surfaceSize.y * 0.5) / surfaceSize.y;\r\n  if (clipRange.y != clipRange.x) {\r\n    oPos.z = (oPos.z - 0.5 * (clipRange.x + clipRange.y)) / (0.5 * (clipRange.y - clipRange.x));\r\n  }\r\n  if (oPos.w < 0.0) {\r\n    oPos.xyz *= oPos.w;\r\n  } else {\r\n    oPos.w = 1.0;\r\n  }\r\n  float fogDistance = oFog.x;\r\n  float fogFactor = fogParam[0] + fogDistance * fogParam[1];\r\n  fogFactor -= 1.0;\r\n  oFog.xyzw = vec4(fogFactor);\r\n\r\n  vtx.D0 = clamp(oD0, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.D1 = clamp(oD1, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.B0 = clamp(oB0, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.B1 = clamp(oB1, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.Fog = oFog.x * vtx.inv_w;\r\n  vtx.T0 = oT0 * vtx.inv_w;\r\n  vtx.T1 = oT1 * vtx.inv_w;\r\n  vtx.T2 = oT2 * vtx.inv_w;\r\n  vtx.T3 = oT3 * vtx.inv_w;\r\n  gl_Position = oPos;\r\n  gl_PointSize = oPts.x;\r\n\r\n}\r\n```\r\n\r\n```glsl\r\n#version 330\r\n\r\nstruct VertexData {\r\n  float inv_w;\r\n  vec4 D0;\r\n  vec4 D1;\r\n  vec4 B0;\r\n  vec4 B1;\r\n  float Fog;\r\n  vec4 T0;\r\n  vec4 T1;\r\n  vec4 T2;\r\n  vec4 T3;\r\n};\r\nnoperspective in VertexData g_vtx;\r\n#define vtx g_vtx\r\n\r\nout vec4 fragColor;\r\n\r\nuniform vec4 fogColor;\r\nuniform ivec4 clipRegion[1];\r\nvoid main() {\r\n/*  Window-clip (Inclusive) */\r\nbool clipContained = false;\r\nfor (int i = 0; i < 1; i++) {\r\n  bvec4 clipTest = bvec4(lessThan(gl_FragCoord.xy, clipRegion[i].xy),\r\n                         greaterThan(gl_FragCoord.xy, clipRegion[i].zw));\r\n  if (!any(clipTest)) {\r\n    clipContained = true;\r\n    break;\r\n  }\r\n}\r\nif (!clipContained) { discard; }\r\nvec4 pD0 = vtx.D0 / vtx.inv_w;\r\nvec4 pD1 = vtx.D1 / vtx.inv_w;\r\nvec4 pB0 = vtx.B0 / vtx.inv_w;\r\nvec4 pB1 = vtx.B1 / vtx.inv_w;\r\nvec4 pFog = vec4(fogColor.rgb, clamp(vtx.Fog / vtx.inv_w, 0.0, 1.0));\r\nvec4 pT0 = vtx.T0 / vtx.inv_w;\r\nvec4 pT1 = vtx.T1 / vtx.inv_w;\r\nvec4 pT2 = vtx.T2 / vtx.inv_w;\r\nvec4 pT3 = vtx.T3 / vtx.inv_w;\r\n\r\nvec4 v0 = pD0;\r\nvec4 v1 = pD1;\r\nvec4 t0 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 t1 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 t2 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 t3 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 r0;\r\nr0.a = 1.0;\r\n// Stage 0\r\n// Final Combiner\r\nr0.rgb = (1.0 - 0.0) + mix(vec3(0.0), vec3(0.0), vec3(0.0));\r\nr0.a = vec3(0.0).x;\r\nfragColor = r0;\r\n}\r\n```\r\n\r\n```glsl\r\n#version 330\r\n\r\nlayout(lines_adjacency) in;\r\nlayout(triangle_strip, max_vertices = 4) out;\r\n\r\nstruct VertexData {\r\n  float inv_w;\r\n  vec4 D0;\r\n  vec4 D1;\r\n  vec4 B0;\r\n  vec4 B1;\r\n  float Fog;\r\n  vec4 T0;\r\n  vec4 T1;\r\n  vec4 T2;\r\n  vec4 T3;\r\n};\r\nnoperspective in VertexData v_vtx[];\r\nnoperspective out VertexData g_vtx;\r\n\r\nvoid emit_vertex(int index) {\r\n  gl_Position = gl_in[index].gl_Position;\r\n  gl_PointSize = gl_in[index].gl_PointSize;\r\n  g_vtx = v_vtx[index];\r\n  EmitVertex();\r\n}\r\n\r\nvoid main() {\r\n  emit_vertex(0);\r\n  emit_vertex(1);\r\n  emit_vertex(3);\r\n  emit_vertex(2);\r\n  EndPrimitive();\r\n}\r\n```\r\n\r\n```glsl\r\n// VS stuff\r\n\r\nvoid main() {\r\n  /* Slot 0: 0x00000000 0x00C0001B 0x0836186C 0x20708800 */\r\n  DPH(oPos,x, v0, c[0]);\r\n\r\n  /* Slot 1: 0x00000000 0x00C0201B 0x0836186C 0x20704800 */\r\n  DPH(oPos,y, v0, c[1]);\r\n\r\n  /* Slot 2: 0x00000000 0x00C0401B 0x0836186C 0x20702800 */\r\n  DPH(oPos,z, v0, c[2]);\r\n\r\n  /* Slot 3: 0x00000000 0x00C0601B 0x0836186C 0x20701800 */\r\n  DPH(oPos,w, v0, c[3]);\r\n\r\n  /* Slot 4: 0x00000000 0x0020081B 0x0836106C 0x2070C848 */\r\n  MOV(oT0,xy, v4);\r\n\r\n  /* Slot 5: 0x00000000 0x0020121B 0x0836106C 0x2070F818 */\r\n  MOV(oD0,xyzw, v9);\r\n\r\n  /* Slot 6: 0x00000000 0x00C1001B 0x0836186C 0x22800FF8 */\r\n  DPH(R8,z, v0, c[8]);\r\n\r\n  /* Slot 7: 0x00000000 0x0647401B 0xC4361BFF 0x1078E800 */\r\n  MUL(oPos,xyz, R12, c[58]);\r\n  RCC(R1,x, R12.w);\r\n\r\n  /* Slot 8: 0x00000000 0x012008AA 0x85FE106C 0x22800FF8 */\r\n  MIN(R8,z, R8.z, v4.w);\r\n\r\n  /* Slot 9: 0x00000000 0x004160AA 0x8400186C 0x22800FF8 */\r\n  MUL(R8,z, R8.z, c[11].x);\r\n\r\n  /* Slot 10: 0x00000000 0x016008AA 0x85FE106C 0x20701820 */\r\n  SLT(oD1,w, R8.z, v4.w);\r\n\r\n  /* Slot 11: 0x00000000 0x0087601B 0xC400286C 0x3070E801 */\r\n  MAD(oPos,xyz, R12, R1.x, c[59]);\r\n\r\n  if (oPos.w == 0.0 || isinf(oPos.w)) {\r\n    vtx.inv_w = 1.0;\r\n  } else {\r\n    vtx.inv_w = 1.0 / oPos.w;\r\n  }\r\n  oPos.x = 2.0 * (oPos.x - surfaceSize.x * 0.5) / surfaceSize.x;\r\n  oPos.y = -2.0 * (oPos.y - surfaceSize.y * 0.5) / surfaceSize.y;\r\n  if (clipRange.y != clipRange.x) {\r\n    oPos.z = (oPos.z - 0.5 * (clipRange.x + clipRange.y)) / (0.5 * (clipRange.y - clipRange.x));\r\n  }\r\n  if (oPos.w < 0.0) {\r\n    oPos.xyz *= oPos.w;\r\n  } else {\r\n    oPos.w = 1.0;\r\n  }\r\n  float fogDistance = oFog.x;\r\n  float fogFactor = fogParam[0] + fogDistance * fogParam[1];\r\n  fogFactor -= 1.0;\r\n  oFog.xyzw = vec4(fogFactor);\r\n\r\n  vtx.D0 = clamp(oD0, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.D1 = clamp(oD1, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.B0 = clamp(oB0, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.B1 = clamp(oB1, 0.0, 1.0) * vtx.inv_w;\r\n  vtx.Fog = oFog.x * vtx.inv_w;\r\n  vtx.T0 = oT0 * vtx.inv_w;\r\n  vtx.T1 = oT1 * vtx.inv_w;\r\n  vtx.T2 = oT2 * vtx.inv_w;\r\n  vtx.T3 = oT3 * vtx.inv_w;\r\n  gl_Position = oPos;\r\n  gl_PointSize = oPts.x;\r\n\r\n}\r\n```\r\n\r\n```glsl\r\n#version 330\r\n\r\nstruct VertexData {\r\n  float inv_w;\r\n  vec4 D0;\r\n  vec4 D1;\r\n  vec4 B0;\r\n  vec4 B1;\r\n  float Fog;\r\n  vec4 T0;\r\n  vec4 T1;\r\n  vec4 T2;\r\n  vec4 T3;\r\n};\r\nnoperspective in VertexData g_vtx;\r\n#define vtx g_vtx\r\n\r\nout vec4 fragColor;\r\n\r\nuniform vec4 fogColor;\r\nuniform ivec4 clipRegion[1];\r\nuniform sampler2D texSamp0;\r\nuniform float alphaRef;\r\nvoid main() {\r\n/*  Window-clip (Inclusive) */\r\nbool clipContained = false;\r\nfor (int i = 0; i < 1; i++) {\r\n  bvec4 clipTest = bvec4(lessThan(gl_FragCoord.xy, clipRegion[i].xy),\r\n                         greaterThan(gl_FragCoord.xy, clipRegion[i].zw));\r\n  if (!any(clipTest)) {\r\n    clipContained = true;\r\n    break;\r\n  }\r\n}\r\nif (!clipContained) { discard; }\r\nvec4 pD0 = vtx.D0 / vtx.inv_w;\r\nvec4 pD1 = vtx.D1 / vtx.inv_w;\r\nvec4 pB0 = vtx.B0 / vtx.inv_w;\r\nvec4 pB1 = vtx.B1 / vtx.inv_w;\r\nvec4 pFog = vec4(fogColor.rgb, clamp(vtx.Fog / vtx.inv_w, 0.0, 1.0));\r\nvec4 pT0 = vtx.T0 / vtx.inv_w;\r\nvec4 pT1 = vtx.T1 / vtx.inv_w;\r\nvec4 pT2 = vtx.T2 / vtx.inv_w;\r\nvec4 pT3 = vtx.T3 / vtx.inv_w;\r\n\r\nvec4 v0 = pD0;\r\nvec4 v1 = pD1;\r\nvec4 t0 = textureProj(texSamp0, pT0.xyw);\r\nvec4 t1 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 t2 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 t3 = vec4(0.0); /* PS_TEXTUREMODES_NONE */\r\nvec4 r0;\r\nr0.a = t0.a;\r\n// Stage 0\r\nr0.rgb = vec3((((1.0 - t0.rgb) * (1.0 - v0.rgb)) + (t0.rgb * (1.0 - 0.0))));\r\n// Stage 1\r\nr0.rgb = vec3((((1.0 - v0.a) * r0.rgb) + (v0.a * (1.0 - 0.0))));\r\nr0.a = ((((1.0 - v0.a) * r0.a) + (v0.a * (1.0 - 0.0))));\r\n// Final Combiner\r\nr0.rgb = r0.rgb + mix(vec3(0.0), vec3(0.0), vec3(0.0));\r\nr0.a = vec3(r0.a).x;\r\nif (!(r0.a > alphaRef)) discard;\r\nfragColor = r0;\r\n}\r\n```\r\n\r\n```\r\nnv2a: shader linking failed: Type mismatch: Type of _O;v_vtx;inv_w different between shaders.\r\nType mismatch: Type of _O;v_vtx;D0 different between shaders.\r\nType mismatch: Type of _O;v_vtx;D1 different between shaders.\r\nType mismatch: Type of _O;v_vtx;B0 different between shaders.\r\nType mismatch: Type of _O;v_vtx;B1 different between shaders.\r\nType mismatch: Type of _O;v_vtx;Fog different between shaders.\r\nType mismatch: Type of _O;v_vtx;T0 different between shaders.\r\nType mismatch: Type of _O;v_vtx;T1 different between shaders.\r\nType mismatch: Type of _O;v_vtx;T2 different between shaders.\r\nType mismatch: Type of _O;v_vtx;T3 different between shaders.\r\nOut of resource error.\r\n```\r\n</details>"}}
{"actor":{"display_login":"JayFoxRox"}}